Added health, respawning and Bullet spawners
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : MonoBehaviour
|
||||
{
|
||||
@@ -21,7 +22,7 @@ public class GameManager : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -49,4 +50,11 @@ public class GameManager : MonoBehaviour
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RestartGame()
|
||||
{
|
||||
//get active scene and reload it
|
||||
SceneManager.LoadScene(SceneManager.GetActiveScene().name);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user