ActivateCheckPoint() private méthode

Activate the checkpoint
private ActivateCheckPoint ( ) : void
Résultat void
Exemple #1
0
    public void Update()
    {
        if (!IsAlive && !_deathFlag)
        {
            _deathFlag = true;
            NoOfMoves++;
            GameManager.IsPlaying    = false;
            ScreenMaskScript.Trigger = true;
        }

        if (_deathFlag)
        {
            _respawnTimer += Time.deltaTime;
            Debug.Log(_respawnTimer.ToString() + " <---- ");
            if (_respawnTimer > _respawnTime)
            {
                _respawnTimer = 0;
                _deathFlag    = false;
                IsAlive       = true;

                CheckPoint.ActivateCheckPoint();
                Goliath.health = Goliath.MaxHealth;

                GameManager.IsPlaying = true;
            }
        }
    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "CheckPoint")
        {
            LastCheckPoint = other.GetComponent <CheckPoint>();
            LastCheckPoint.ActivateCheckPoint();
        }

        if (other.tag == "Tongue")
        {
            if (m_PlayerInvincibilityTimer.IsRunning() == false)
            {
                TakeDamage(15);
                m_PlayerInvincibilityTimer.Restart();

                // TODO: Play player hurt sound
            }
        }
    }