Esempio n. 1
0
        private void PlayerKilled()
        {
            Debug.Log("Player killed.");

            GameManager gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();

            gameManager.PlayerDie();
            _animator.SetTrigger("Die");

            if (!HitGround)
            {
                GetComponent <Rigidbody2D>().gravityScale = 0.45f;                //make bird fall slowly
            }

            Debug.Log("Player is dead, on ground: " + Dead + ", " + HitGround);
        }