private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag.Equals("Player")) { lmc.ShowLostMenu(); } }
// Update is called once per frame void Update() { if (Helth <= 0) { Destroy(gameObject); lmc.ShowLostMenu(); } if (jumpFlag && CrossPlatformInputManager.GetAxis("Vertical") == 1) { jumpFlag = false; inFly = true; anim.ResetTrigger("Walk"); anim.ResetTrigger("Idle"); anim.SetTrigger("Jump"); anim.SetTrigger("Idle"); } }