Exemple #1
0
        public static void Die(Player player)
        {
            player.rigidbody2D.velocity = Vector2.zero;
            health--;

            if (health < 1)
            {
                var go = GameObject.Find("Level").transform.FindChild("RetryQuit").gameObject;
                go.SetActive(true);
                player.gameObject.GetComponent<Move>().death = true;
            }

            if (health < 0)
                Load();
            else
                player.lives[health].enabled = false;
        }
Exemple #2
0
 private void Start()
 {
     textMesh = GameObject.Find("Points").GetComponent<TextMesh>();
     player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<Player>();
     textMeshPointsNoti = GameObject.Find("PointsNoti").GetComponent<TextMesh>();
 }