void HandleInput() { if (Input.GetKeyDown(KeyCode.Space)) { isHealing = true; } if (Input.GetKeyUp(KeyCode.Space)) { isHealing = false; } if (Input.GetKeyDown(KeyCode.T)) { if (power && canUsePower) //prevent calling if uninitialized { power.ActivatePower(); canUsePower = false; } } if (Input.GetKeyUp(KeyCode.Mouse0)) { anim.SetTrigger("LightAttack"); } if (Input.GetKeyUp(KeyCode.Mouse1)) { anim.SetTrigger("HeavyAttack"); } if (Input.GetKeyUp(KeyCode.F)) { anim.SetTrigger("Flurry"); } if (Input.GetKeyDown(KeyCode.S)) { anim.SetBool("IsBlocking", true); stam.regainStamina = false; } if (Input.GetKeyUp(KeyCode.S)) { anim.SetBool("IsBlocking", false); stam.regainStamina = true; } if (movementDir != 0) { anim.SetBool("IsRunning", true); } else { anim.SetBool("IsRunning", false); } }
/* * Helper method to set the active power and turn off others if in use. */ void SetActivePower(Power activePower, Power inactivePower1, Power inactivePower2) { activePower.ActivatePower (); }
/* * Helper method to set the active power and turn off others if in use. */ void SetActivePower(Power activePower, Power inactivePower1, Power inactivePower2) { activePower.ActivatePower(); }