Beispiel #1
0
    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);
    }
Beispiel #2
0
 public void ChangeState(_ActionState newState)
 {
     actionState = newState;
 }