Esempio n. 1
0
 public virtual void ExecuteAll()
 {
     if (characterActions.Count <= 0)
     {
         return;
     }
     currentAction = characterActions[0];
     currentAction.Execute(hero, ReadyForNextAction);
 }
Esempio n. 2
0
    protected virtual void ExecuteNextTemporaryAction()
    {
        if (temporaryCharacterActions.Count < 1)
        {
            return;
        }

        currentTemporaryAction = temporaryCharacterActions[0];
        currentTemporaryAction.Execute(hero, ReadyForNextTemporaryAction);
    }
Esempio n. 3
0
    protected virtual void ExecuteNext()
    {
        if (temporaryCharacterActions.Count > 0)
        {
            ExecuteNextTemporaryAction();
            return;
        }

        if (characterActions.Count <= characterActions.FindIndex(IsCurrentAction) + 1)
        {
            if (looping)
            {
                ExecuteAll();
            }
            return;
        }
        currentAction = characterActions[characterActions.FindIndex(IsCurrentAction) + 1];
        currentAction.Execute(hero, ReadyForNextAction);
    }