/// <summary> /// Checks to see if we can change to the specified state and returns the outcome. /// </summary> /// <param name="target">The target CharacterMotor.</param> /// <param name="newState">The new state we are attempting to change to.</param> /// <returns>TRUE if the change is possible, else FALSE.</returns> public virtual bool ChangeState(CharacterMotor target, CharacterState newState) { if (!target.CanMove()) { if (newState != null && !(newState is IdleState)) { return false; } } return true; }