// Update is called once per frame protected override void Update() { ManaBarStats(); timer += Time.deltaTime; if (isManaFinish == false) { if (Input.GetKeyDown(KeyCode.Space) && isSpecialActive == false) { timer = 0; isSpecialActive = true; } if (isSpecialActive == true) { myRigidbody.constraints = RigidbodyConstraints2D.FreezeAll; shield.SetActive(true); if (timer >= specialTime) { timer = 0; mana.MyCurrentValue -= 10; isSpecialActive = false; shield.SetActive(false); myRigidbody.constraints = RigidbodyConstraints2D.FreezeRotation; } } } if (health.MyCurrentValue > 70) { FrameAnim.SetInteger("State", 2); } else if (health.MyCurrentValue < 70 && health.MyCurrentValue > 35) { FrameAnim.SetInteger("State", 0); } else if (health.MyCurrentValue < 35) { FrameAnim.SetInteger("State", 1); } GetInput(); base.Update(); CamMove.CameraShift(); }