Пример #1
0
    public void Die()
    {
        if (!IsDead)
        {
            IsDead = true;

            //_playerController.enabled = false;
            _deathCounter.IncreaseDeath();
            new WaitForSeconds(0.5f);

            this.transform.position = _lastCheckPoint.Position;
            //_playerController.enabled = true;

            foreach (BoxCheckpoint caixa in arrayCaixas)
            {
                caixa.resetPosition();
            }

            foreach (PlataformSlider plataforma in arrayPlataformasMoveis)
            {
                plataforma.start = false;
            }

            IsDead = false;
        }
    }
Пример #2
0
    public void Die()
    {
        if (!IsDead)
        {
            IsDead = true;

            _playerController.enabled = false;
            _deathCounter.IncreaseDeath();
            new WaitForSeconds(0.5f);
            this.transform.position   = _lastCheckPoint.position;
            _playerController.enabled = true;

            IsDead = false;
        }
    }