Exemplo n.º 1
0
    public override void ActionUpdate(float timekey)
    {
        if (currentAction != null)
        {
            if (currentAction.IsDone)
            {
                currentAction = null;
            }
            else
            {
                currentAction.ActionUpdate(timekey);
            }
        }


        if (currentAction == null)
        {
            if (actions.Count > 0)
            {
                currentAction = actions.Dequeue();
                currentAction.ActionStart(character);
            }
            else
            {
                Done();
            }
        }
    }
Exemplo n.º 2
0
    internal void PushAction(CharacterActionBase action)
    {
        if (action == null)
        {
            return;
        }

        if (_actions == null)
        {
            _actions = new Queue <CharacterActionBase>();
        }

        _actions.Enqueue(action);
    }
Exemplo n.º 3
0
 public void PushAction(CharacterActionBase action)
 {
     actions.Enqueue(action);
 }