예제 #1
0
    void RegisterEvent()
    {
        EventMgr.Instance.onGameInitEnter.Register(el_GameInitEnter, SetUIGameInit);
        EventMgr.Instance.onGameInitExit.Register(el_GameInitExit, (param) => { });
        EventMgr.Instance.onGamePositioningEnter.Register(el_GamePositioningEnter, (param) => SetUIPositioning(true));
        EventMgr.Instance.onGamePositioningExit.Register(el_GamePositioningExit, (param) => SetUIPositioning(false));
        EventMgr.Instance.onGameBattleEnter.Register(el_GameBattleEnter, (param) => { });
        EventMgr.Instance.onGameBattleExit.Register(el_GameBattleExit, (param) => { });
        EventMgr.Instance.onGameVictoryEnter.Register(el_GameVictoryEnter, (param) => { });
        EventMgr.Instance.onGameVictoryExit.Register(el_GameVictoryEnter, (param) => { });
        EventMgr.Instance.onGameDefeatEnter.Register(el_GameDefeatExit, (param) => { });
        EventMgr.Instance.onGameDefeatExit.Register(el_GameDefeatExit, (param) => { });

        EventMgr.Instance.onTurnActionEnter.Register(el_TurnActionEnter, (param) => SetUIAction(true));
        EventMgr.Instance.onTurnActionExit.Register(el_TurnActionExit, (param) => SetUIAction(false));
        EventMgr.Instance.onTurnBeginEnter.Register(el_TurnBeginEnter, SetUIBeginEnter);
        EventMgr.Instance.onTurnBeginExit.Register(el_TurnBeginExit, (param) => actionPanel.UnsetPanel());
        EventMgr.Instance.onTurnItemEnter.Register(el_TurnItemEnter, (param) => itemPanel.SetPanel(turnMgr.turns.Peek().itemBag.GetItem(), OnClickItemSlotBtn));
        EventMgr.Instance.onTurnItemExit.Register(el_TurnItemExit, (param) => itemPanel.UnsetPanel());
        EventMgr.Instance.onTurnMove.Register(el_TurnMove, (param) => actionPointPanel.SetText(turnMgr.turns.Peek().actionPointsRemain));
        EventMgr.Instance.onTurnNobody.Register(el_TurnNobody, SetUINobody);
        EventMgr.Instance.onTurnPlan.Register(el_TurnPlan, SetUIPlan);
    }