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