private void UpdateInput() { if (behaviour != null) { behaviour.direction = new Vector2() { x = Input.GetAxisRaw("Horizontal"), y = Input.GetAxisRaw("Vertical"), }; if (behaviour.currentState != Character_Behaviour.PlayerStates.HitMelee || behaviour.currentState != Character_Behaviour.PlayerStates.HitRanged) { if (Input.GetKey(behaviour.reflectInput)) { behaviour.SetState(Character_Behaviour.PlayerStates.Reflect); } if (behaviour.canDodge) { if (Input.GetKey(behaviour.dodgeInput)) { if (behaviour.direction.x != 0) { behaviour.SetState(Character_Behaviour.PlayerStates.DashDodge); } else { behaviour.SetState(Character_Behaviour.PlayerStates.Dodge); } behaviour.canDodge = false; behaviour.dodgeTimer = 0; } } else { behaviour.CowndownDodge(); } } } }