Exemplo n.º 1
0
    // 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;
        }
Exemplo n.º 3
0
 void Restart()
 {
     LevelTimer.Reset();
     LevelTimer.Start();
 }