示例#1
0
    private void OnCollisionEnter(Collision collision)
    {
        if (!collision.gameObject.GetComponent <Player>())
        {
            return;
        }

        TiggerManager.ResetTriggers();
        Player.Instance.OnDeath();
    }
示例#2
0
    private void Update()
    {
        if (!_victory)
        {
            return;
        }

        if (Input.GetKey(KeyCode.Escape))
        {
            Application.Quit();
        }

        if (Input.GetKey(KeyCode.Space))
        {
            Player.Instance.OnDeath();
            TiggerManager.ResetTriggers();
            victoryText.enabled     = false;
            instructionText.enabled = false;
        }
    }
示例#3
0
 private void OnTriggerEnter(Collider other)
 {
     Player.Instance.OnDeath();
     TiggerManager.ResetTriggers();
 }