예제 #1
0
    // Start is called before the first frame update
    void Awake()
    {
        Instance = this;
        UnityEngine.Events.UnityAction [] actions = new UnityEngine.Events.UnityAction[2];
        actions[0] = () => { SwitchStatsAndActions(true); };
        actions[1] = () => { SwitchStatsAndActions(false); };
        actionsStatsButton.InitActions(actions, 0);
        actions[0].Invoke();

        myPanel.AddActionToButton(new UnityAction(() =>
        {
            if (GameManager.Instance.representationManager.currentRepresentation == GameManager.Instance.representationManager.buildingsRepresentation)
            {
                (GameManager.Instance.representationManager.buildingsRepresentation as MapRepresentation).DeselectAll();
            }
        }));
    }