// Call this in a fail state to reset the player. // Eventually this needs to involve some sort of timed delay, // so the you don't just restart immediately public void Died() { LevelTimer timer = GetComponent <LevelTimer>(); FindAssets(); Player.transform.position = getSpawnLocation(); timer.Reset(); timer.StartTimer(); }
private void Start() { ControllerState = GameController.State.Enter; score = Score.New(); if (!scoreboardModelView) { scoreboardModelView = ScoreboardModelView.Instance; } scoreboardModelView.Reset(); if (!levelTimer) { levelTimer = GameObject.FindObjectOfType <LevelTimer>(); } levelTimer.Reset(); CollectableNotifier.RaisedOnCollectableCollected += HandleOnCollectableNotifierNotify; }
void Restart() { LevelTimer.Reset(); LevelTimer.Start(); }