Пример #1
0
 public void InitView(GameObject gameObject)
 {
     //templet
     m_mediator = new PVEPanelMediator(this);
     App.Facade.RegisterMediator(m_mediator);
     m_proxy    = App.Facade.RetrieveProxy("UserDataProxy") as UserDataProxy;
     m_pveProxy = App.Facade.RetrieveProxy("PVEProxy") as PVEProxy;
     InitUIBinder(gameObject);
     m_chess.SetActive(false);
     m_ready.onClick.AddListener(OnReadyClick);
     m_test.onClick.AddListener(OnUndoClick);
     m_Undo.onClick.AddListener(OnRoundStart);
 }
Пример #2
0
    public void InitView(GameObject gameObject)
    {
        InitUIBinder(gameObject);
        m_BottomButton.onClick.AddListener(OnConfirmClick);
        m_N.onClick.AddListener(OnNClick);
        m_R.onClick.AddListener(OnRClick);
        m_B.onClick.AddListener(OnBClick);
        m_Q.onClick.AddListener(OnQClick);

        m_object   = gameObject;
        m_mediator = new TypeSelectPanelMediator(this);
        m_pvpProxy = new PVPProxy();
        m_pveProxy = new PVEProxy();
        App.Facade.RegisterMediator(m_mediator);
        m_proxy = App.Facade.RetrieveProxy("UserDataProxy") as UserDataProxy;
    }
Пример #3
0
    public void InitView(GameObject gameObject)
    {
        Debug.Log("Lobby Panel Inited");
        m_object = gameObject;
        InitUIBinder(gameObject);
        m_mediator = new LobbyPanelMediator(this);
        m_pvpProxy = App.Facade.RetrieveProxy("PVPProxy") as PVPProxy;
        if (m_pvpProxy == null)
        {
            m_pvpProxy = new PVPProxy();
            App.Facade.RegisterProxy(m_pvpProxy);
        }
        m_pvp02Proxy = App.Facade.RetrieveProxy("PVP02Proxy") as PVP02Proxy;
        if (m_pvp02Proxy == null)
        {
            m_pvp02Proxy = new PVP02Proxy();
            App.Facade.RegisterProxy(m_pvp02Proxy);
        }

        m_pveProxy = App.Facade.RetrieveProxy("PVEProxy") as PVEProxy;
        if (m_pveProxy == null)
        {
            m_pveProxy = new PVEProxy();
            App.Facade.RegisterProxy(m_pveProxy);
        }

        App.Facade.RegisterMediator(m_mediator);
        m_proxy = App.Facade.RetrieveProxy("UserDataProxy") as UserDataProxy;

        m_PVP.onClick.AddListener(OnPVPClick);
        m_PVE.onClick.AddListener(OnPVEClick);
        m_PVP02.onClick.AddListener(OnPVP02Click);
        m_PVP02Local.onClick.AddListener(OnPVP02LocalClick);
        m_Easy.onClick.AddListener(OnEasyClick);
        m_Hard.onClick.AddListener(OnHardClick);
        m_Normal.onClick.AddListener(OnNormalClick);
        m_cancel.onClick.AddListener(OnCancelClick);
        App.Facade.RegisterCommand(NotificationConstant.Match, () => new MatchCommand());
        App.Facade.RegisterCommand(NotificationConstant.CancelMatch, () => new CancelMatchCommand());
        App.NetworkManager.RegisterPushCall(Config.PushMessage.MatchSuccess, OnMatchSuccess);
    }