ActivateCheckPoint() 개인적인 메소드

Activate the checkpoint
private ActivateCheckPoint ( ) : void
리턴 void
예제 #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;
            }
        }
    }
예제 #2
0
    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
            }
        }
    }