ofb/Assets/Scripts/StateController.cs
slevy14 275763628b reconfigured collision
also made some adjustments to player behavior and controller
2023-04-17 15:22:24 -07:00

25 lines
625 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class StateController : MonoBehaviour {
[Header("Respawning")]
[SerializeField] GameObject player;
public GameObject spawnPoint;
[SerializeField] private GameObject deathCanvas;
void Awake() {
deathCanvas.SetActive(false);
}
public void RespawnPlayer() {
SetDeathCanvasActive(false);
Instantiate(player, spawnPoint.transform.position, spawnPoint.transform.rotation);
}
public void SetDeathCanvasActive(bool activeState) {
deathCanvas.SetActive(activeState);
}
}