public override void Execute(CharacterStateManager charStates) { if (states == null) { states = charStates as PlayerStateManager; } if (!hasInit) { InitStats(); } if (states.HasStamina(((IntVariable)staminaCost.targetStat.value).value)) { SubtractStamina(states); PlayRollAnimation(states); states.isRolling = true; states.isAttacking = false; if (states.isLockedOn) { states.rollDirection = states.movementDirection; } else { states.rollDirection = states.mTransform.forward; } } else { Debug.Log("You don't have enough stamina to roll."); } }