// Update is called once per frame void Update() { // Debug.Log("IsPlaying(\"bunny_die\"): " + IsPlaying("bunny_die") + ", BunnyScript.getHealth(): "+ BunnyScript.getHealth()); if (BunnyScript.getHealth() <= 0) { return; } if (Input.GetKeyUp(KeyCode.K)) { anim.Play("bunny_die"); } if (IsPlaying("bunny_die")) { return; } if (BunnyScript.rb.velocity.x > 0) { sr.flipX = false; } else if (BunnyScript.rb.velocity.x < 0) { sr.flipX = true; } if (BunnyScript.isOnGround()) { DoGroundAnimations(); } else { if (BunnyScript.rb.velocity.y < 0) { anim.Play("bunny_jumpFall"); } } }