예제 #1
0
    public void SetTurnOrder(List <FightingEntity> fighters)
    {
        this.turnOrderHeaderText.gameObject.SetActive(true);
        turnTexts   = new List <BasicText>();
        this.arrows = new List <GameObject>();
        this.index  = 0;
        for (int i = 0; i < fighters.Count; i++)
        {
            FightingEntity fighter          = fighters[i];
            BasicText      instantiatedText = Instantiate <BasicText>(turnTextPrefab);
            instantiatedText.text.SetText(fighter.Name);
            instantiatedText.text.color = fighter.GetOrderColor();



            instantiatedText.transform.SetParent(turnOrderParent);
            turnTexts.Add(instantiatedText);

            if (i != fighters.Count - 1)
            {
                GameObject arrow = Instantiate(arrowPrefab);
                arrow.transform.SetParent(turnOrderParent);
                arrows.Add(arrow);
            }
        }
    }
예제 #2
0
    private void SetSlotUIForAction(QueuedAction action)
    {
        if (!GameManager.Instance.battleComponents.turnManager.GetPhase().CanInputActions())
        {
            return;
        }

        FightingEntity user = action.user;

        List <FightingEntity> targets = action.GetTargets();

        foreach (FightingEntity target in targets)
        {
            target.fighterSlot.AddTargetArrowUI(user.GetOrderColor());
        }
    }