예제 #1
0
 public void RestartGame()
 {
     meteorsInPlay  = new List <MeteorController>();
     meteorSpawners = new List <MeteorSpawner>();
     playerShip     = null;
     shipStats      = null;
     SceneManager.LoadScene(SceneManager.GetActiveScene().name);
 }
예제 #2
0
 public void RegisterPlayer(GameObject player)
 {
     if (playerShip != null)
     {
         return;
     }
     playerShip = player;
     shipStats  = playerShip.GetComponent <ShipStatsController>();
     playerShip.GetComponent <ShipLifeController>().onDeathAction += OnDeathAction;
 }