示例#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;
        }
示例#2
0
文件: DropZone.cs 项目: ronaldme/LD30
 private void Start()
 {
     textMesh = GameObject.Find("Points").GetComponent<TextMesh>();
     player = GameObject.FindGameObjectWithTag(Tags.player).GetComponent<Player>();
     textMeshPointsNoti = GameObject.Find("PointsNoti").GetComponent<TextMesh>();
 }