private bool CanChangeToState(_ActionState newState) { if (newState == _ActionState.Idle) { // Still has delay objects. if (delayObjects.Count > 0) { return(false); } // Waiting for current once animation finished if (avatar.IsLoopAnim() == false && avatar.AvatarAnimation.IsEnd() == false) { return(false); } // Still is moving. if (isMoving) { return(false); } } return(true); }
public void ChangeState(_ActionState newState) { actionState = newState; }