Exemplo n.º 1
0
    private void onSetQueuedAction(QueuedAction action)
    {
        if (!action.GetIsSet())
        {
            return;
        }

        FighterSlot slot = action.user.fighterSlot;

        if (!this.fighterToActionMap.ContainsKey(slot))
        {
            Debug.LogError("ERROR: Slot not found!");
            return;
        }


        if (action.user.isEnemy())
        {
            // Mockups don't show enemy targetting
            return;
        }


        if (this.fighterToActionMap[slot] != null)
        {
            this.ClearTargetsForSlot(slot);
        }

        this.fighterToActionMap[slot] = action.GetTargets().Map((FightingEntity fighter) => fighter.fighterSlot);

        this.SetSlotUIForAction(action);
    }
Exemplo n.º 2
0
    public void SetAction(QueuedAction action)
    {
        this.UnsetActions();

        if (!action.GetIsSet())
        {
            return;
        }

        ActionBase actionToDo = action._action;

        for (int i = 0; i < actions.Length; i++)
        {
            if (actions[i] != null)
            {
                if (actions[i].action == actionToDo)
                {
                    if (action.isAutoQueued)
                    {
                        actions[i].SetAutoQueued();
                    }
                    else
                    {
                        actions[i].SetSelected(true);
                    }
                    emptyActions[i].SetActive(false);
                }
                else
                {
                    // Not necessary for auto queue (experimental feature)
                    //actions[i].gameObject.SetActive(false);
                    //emptyActions[i].SetActive(true);
                }
            }
        }
    }
Exemplo n.º 3
0
 public bool HasSetCommand()
 {
     return(_queuedAction.GetIsSet() || this.HasModifier(ModifierAilment.MODIFIER_CANNOT_USE_ACTION));
 }