Пример #1
0
    void SetUIBeginEnter(EventParam param)
    {
        turnMgr = gameMgr._turnMgr;

        Dictionary <ActionType, UnityAction> btnEvents = new Dictionary <ActionType, UnityAction>();

        btnEvents.Add(ActionType.Move, OnClickMoveBtn);
        btnEvents.Add(ActionType.Attack, OnClickAttackBtn);
        btnEvents.Add(ActionType.Item, OnClickItemBtn);
        btnEvents.Add(ActionType.Skill, OnClickSkillBtn);

        Unit nextTurnUnit = turnMgr.turns.Peek();

        actionPanel.SetPanel(nextTurnUnit.actionSlots, nextTurnUnit.actionPointsRemain, btnEvents);
        actionPointPanel.SetText(nextTurnUnit.actionPointsRemain);
        turnPanel.gameObject.SetActive(true);

        if (turnPanel.ShouldUpdateSlots(turnMgr.turns.ToList()))
        {
            turnPanel.SetSlots(statusPanel, turnMgr.turns.ToList());
        }

        testPlayBtn.SetActive(false);
        endTurnBtn.SetActive(true);
        backBtn.SetActive(false);
    }