コード例 #1
0
 //--------------------------一些操作------------------------------------------------------
 void addAllEvent()
 {
     LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_PACKAGE, onUpdatePackage);
     LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_SIGNIN, onUpdateSignIn);
     LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_LUCKDRAW, onUpdateLuckDraw);
     LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_LOBBY_PANEL, onShowLobbyPanel);
 }
コード例 #2
0
 void removeAllEvent()
 {
     LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_PACKAGE);
     LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_SIGNIN);
     LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_LUCKDRAW);
     LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.SHOW_LOBBY_PANEL);
 }
コード例 #3
0
    void OnRespOpenTalentslot(Message msg)
    {
        ViewManagerEvent.EM().InvokeEvent(ViewManagerEvent.EVENT.SHOW_LOADING_ANI, false);

        msgRespOpenTalentslot resp = msgRespOpenTalentslot.deserialize(msg);

        if (resp.result == msgRespOpenTalentslot.eOpenTalentslotResultType.OPEN_SUCCESS)
        {
            //开槽成功
            //refresh ui
            //CommonUtil.Util.showDialog ("温馨提示","开槽成功,当前槽数为:"+resp.currentOpenedCnt);

            Account.setUserGold(resp.currentGold);
            Account.setUserDiamond(resp.currentDiamond);

            LobbyEvent.s_C2V_UpdateTalentForOpenSlot utfos;
            utfos.gold             = resp.currentGold;
            utfos.diamond          = resp.currentDiamond;
            utfos.ret              = CommonDefine.eRespResultType.SUCCESS;
            utfos.currentTalentNum = resp.currentOpenedCnt;
            LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.RESP_OPEN_TALENTSLOT, (object)utfos);
        }
        else if (resp.result == msgRespOpenTalentslot.eOpenTalentslotResultType.OPEN_FAIL_LESS_DIAMOND)
        {
            CommonUtil.Util.showDialog("温馨提示", "开槽失败,您的晶核不足,请充值");
        }
        else if (resp.result == msgRespOpenTalentslot.eOpenTalentslotResultType.OPEN_FAIL_LESS_GOLG)
        {
            CommonUtil.Util.showDialog("温馨提示", "开槽失败,您的金币不足,请充值");
        }
        else if (resp.result == msgRespOpenTalentslot.eOpenTalentslotResultType.OPEN_FAIL_MAX_SLOT)
        {
            CommonUtil.Util.showDialog("温馨提示", "您的天赋槽已全部打开!");
        }
    }
コード例 #4
0
ファイル: LobbyPanel.cs プロジェクト: shacleff/LianQiClient
 public void OnClickOnlineModeBtn()
 {
     LobbyEvent.s_V2VShowLobbyPanel lp;
     lp.from = LobbyEvent.LOBBY_PANEL.LOBBY_LOBBY_PANEL;
     lp.to   = LobbyEvent.LOBBY_PANEL.LOBBY_PLAZAROOM_PANEL;
     LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_LOBBY_PANEL, (object)lp);
 }
コード例 #5
0
    public void onEventShowUserInfo(object data)
    {
        SelfData self = Account.getSelfData();

        //已经可以更新用户相关界面信息
        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.UPDATE_USER_INFO, (object)self);
    }
コード例 #6
0
    public void addAllEvent()
    {
        AccountEvent.EM().AddEvent(AccountEvent.EVENT.LOGIN_SUCCESS, onAccountLoginSuccess);
        //子界面或独立界面刷新事件,请参考store
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_USER_INFO, onEventShowUserInfo);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_PLAZA, onEventShowPlaza);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_LUCKDRAW, onEventShowLuckDraw);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_PACKAGE, onEventShowPackage);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_PRIVATE_MSG, onEventShowPrivateMsg);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_SIGNIN, onEventShowSignIn);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_STORE, onEventShowStore);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_FRIEND, onEventShowFriend);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_RANK, onEventShowRank);

        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.REQ_UPDATE_EMAIL, onEventReqUpdateEmail);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.REQ_FEEDBACK, onEventReqFeedback);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.REQ_OPEN_TALENTSLOT, onEventReqOpenTalentslot);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_USER_TALENT, onEventUpdateUserTalent);

        //声音
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.OPEN_CLOSE_BG_SND, onEventBgSndSwitch);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.OPEN_CLOSE_EFFECT_SND, onEventEffectSndSwitch);


        ProtocolManager.getInstance().addPushMsgEventListener(LobbyProtocol.P_LOBBY_AWARD_EMAIL, OnAwardEmail);
    }
コード例 #7
0
 //LobbyRequestListener
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     Log("onJoinLobbyDone : " + eventObj.getResult());
     if (eventObj.getResult() == 0)
     {
     }
 }
コード例 #8
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         // Debug.Log("Lobby is subscribe");
     }
 }
コード例 #9
0
ファイル: Email.cs プロジェクト: shacleff/LianQiClient
    //--------------------------一些操作------------------------------------------------------
    void addAllEvent()
    {
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_PRIVATEMSG, onUpdateEmail);                  //刷新邮件列表
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_UPDATE_EMAIL_RESULT, onShowUpdateEmailResult); //显示邮件操作结果

        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_PRIVATE_MSG, null);
    }
コード例 #10
0
ファイル: LobbyPanel.cs プロジェクト: shacleff/LianQiClient
    public void showPopup(CommonDefine.ePopupType type)
    {
        hideAllPopups();
        switch (type)
        {
        case CommonDefine.ePopupType.EMAIL:
            _email.gameObject.SetActive(true);
            break;

        case CommonDefine.ePopupType.FEEDBACK:
            _feedback.gameObject.SetActive(true);
            break;

        case CommonDefine.ePopupType.RANK:
            _rank.gameObject.SetActive(true);
            break;

        case CommonDefine.ePopupType.SETTING:
            _setting.gameObject.SetActive(true);
            break;

        case CommonDefine.ePopupType.TALENT:
            LobbyEvent.s_V2VShowLobbyPanel lp;
            lp.from = LobbyEvent.LOBBY_PANEL.LOBBY_LOBBY_PANEL;
            lp.to   = LobbyEvent.LOBBY_PANEL.LOBBY_TALENT_PANEL;
            LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_LOBBY_PANEL, (object)lp);
            break;
        }
    }
コード例 #11
0
ファイル: Email.cs プロジェクト: shacleff/LianQiClient
    void checkIsGettingAllAward()
    {
        bool hasAllGotten = true;

        if (_hasGettingAllAward)
        {
            for (int i = 0; i < _emailList.Count; i++)
            {
                if (_emailList [i].getContent().hasAward &&
                    !_emailList [i].getContent().hasGottenAward)
                {
                    LobbyEvent.sV2C_ReqUpdateEmail re2;
                    re2.id   = _emailList [i].getEmailID();
                    re2.type = CommonDefine.eUpdateEmailType.GET_AWARD;

                    LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.REQ_UPDATE_EMAIL, (object)re2);

                    hasAllGotten = false;

                    break;
                }
            }
            if (hasAllGotten)
            {
                _hasGettingAllAward = false;
            }
        }

        checkAllAwardBtnCanShow();
    }
コード例 #12
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     //Twist.AppController.showToast ("onSubscribeLobbyDone");
     if (eventObj.getResult() == 0)
     {
     }
 }
コード例 #13
0
    void OnEnable()
    {
        addAllEvent();
        initTalentPanel();

        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_USER_INFO, null);
    }
コード例 #14
0
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         WarpClient.GetInstance().SubscribeLobby();
     }
 }
コード例 #15
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     Log("onSubscribeLobbyDone : " + eventObj.getResult());
     if (eventObj.getResult() == 0)
     {
         WarpClient.GetInstance().JoinLobby();
     }
 }
コード例 #16
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         AppWarpManager.instance.isConnected = true;
         Log("subscription successful");
     }
 }
コード例 #17
0
ファイル: StoreView.cs プロジェクト: shacleff/LianQiClient
    void OnEnable()
    {
        //may be add all event again
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_STORE, onUpdateStore);

        //通知c界面显示,需要更新商城
        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_STORE, null);
    }
コード例 #18
0
ファイル: Listener.cs プロジェクト: omrifin/Stratego
 //LobbyRequestListener
 #region LobbyRequestListener
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     Debug.Log("onJoinLobbyDone : " + eventObj.getResult());
     if (eventObj.getResult() == 0)
     {
         state = 1;
     }
 }
コード例 #19
0
 public static LobbyEvent EM()
 {
     if (_instance == null)
     {
         _instance = new LobbyEvent();
     }
     return(_instance);
 }
コード例 #20
0
ファイル: LobbyPanel.cs プロジェクト: shacleff/LianQiClient
    //--------------------------一些操作------------------------------------------------------
    void addAllEvent()
    {
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_USER_INFO, onUpdataUserInfo);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_HAS_EMAIL, onShowHasUnReadEmail);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_SYSMSG, onUpdateSysMsg);

        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_SYSMSG, onShowSysMsg);
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.SHOW_POPUP, onShowPopup);
    }
コード例 #21
0
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     if (eventObj.getResult() == 0)
     {
         // Debug.Log("Lobby is Join");
         WarpClient.GetInstance().SubscribeLobby();
         //WarpClient.GetInstance ().GetOnlineUsers ();
     }
 }
コード例 #22
0
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     //Twist.AppController.showToast ("onJoinLobbyDone");
     if (eventObj.getResult() == 0)
     {
         WarpClient.GetInstance().SubscribeLobby();
         WarpClient.GetInstance().GetOnlineUsers();
     }
 }
コード例 #23
0
 public void OnClickBackBtn()
 {
     //
     //切换到主大厅界面
     LobbyEvent.s_V2VShowLobbyPanel lp;
     lp.from = LobbyEvent.LOBBY_PANEL.LOBBY_TALENT_PANEL;
     lp.to   = LobbyEvent.LOBBY_PANEL.LOBBY_LOBBY_PANEL;
     LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_LOBBY_PANEL, (object)lp);
 }
コード例 #24
0
ファイル: LobbyPanel.cs プロジェクト: shacleff/LianQiClient
    void removeAllEvent()
    {
        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_USER_INFO);
        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.SHOW_HAS_EMAIL);
        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_SYSMSG);

        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.SHOW_SYSMSG);

        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.SHOW_POPUP);
    }
コード例 #25
0
    void removeAllEvent()
    {
        LobbyEvent.EM().RemoveEvent(LobbyEvent.EVENT.UPDATE_PLAZA);

        RoomEvent.EM().RemoveEvent(RoomEvent.EVENT.UPDATE_LEAVE_ROOM);
        RoomEvent.EM().RemoveEvent(RoomEvent.EVENT.UPDATE_ROOMRULE);
        RoomEvent.EM().RemoveEvent(RoomEvent.EVENT.PLAER_ENTER);
        RoomEvent.EM().RemoveEvent(RoomEvent.EVENT.UPDATE_PLAER_STATE);
        RoomEvent.EM().RemoveEvent(RoomEvent.EVENT.UPDATE_DISSOLVE_ROOM);
    }
コード例 #26
0
ファイル: Email.cs プロジェクト: shacleff/LianQiClient
 public void OnClickGetAwardBtn()
 {
     //
     if (_currentSelectEmailID != -1)
     {
         LobbyEvent.sV2C_ReqUpdateEmail re;
         re.id   = _emailList[_currentSelectEmailID].getEmailID();
         re.type = CommonDefine.eUpdateEmailType.GET_AWARD;
         LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.REQ_UPDATE_EMAIL, (object)re);
     }
 }
コード例 #27
0
    public void OnClickTalentLockBtn(int id)
    {
        //开槽

        _openSlotId = id;

        LobbyEvent.sV2C_OpenTalentslot ot;
        ot.type = CommonDefine.eOpenByType.OPEN_BY_DIAMOND;        //默认只能钻石开槽。如果需要别的,这里需要弹窗,并在选择后请求

        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.REQ_OPEN_TALENTSLOT, (object)ot);
    }
コード例 #28
0
ファイル: Rank.cs プロジェクト: shacleff/LianQiClient
    //--------------------------一些操作------------------------------------------------------
    void addAllEvent()
    {
        LobbyEvent.EM().AddEvent(LobbyEvent.EVENT.UPDATE_RANK, onUpdateRank);

        //请求显示界面
        LobbyEvent.RankScopeType rst;
        rst.scope = LobbyEvent.RankScopeType.RANK_SCOPE_TYPE.RANK_AREA;
        rst.type  = LobbyEvent.RankScopeType.RANK_TYPE.RANK_GOLD;

        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_RANK, (object)rst);
    }
コード例 #29
0
    void OnEnable()
    {
        for (int i = 0; i < 4; i++)
        {
            //	_realPlayer [i] = null;
        }

        addAllEvent();

        LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_PLAZA, null);
    }
コード例 #30
0
        public void DeserializeLobbyEventsTest()
        {
            List <LobbyEvent> events = JsonConvert.DeserializeObject <List <LobbyEvent> >(Resources.SampleLobbyEvents, RiotClient.JsonSettings);

            Assert.That(events, Is.Not.Null.And.Not.Empty);
            LobbyEvent @event = events.First();

            Assert.That(@event.EventType, Is.Not.Null.And.Not.Empty);
            Assert.That(@event.SummonerId, Is.Not.Null);
            Assert.That(@event.SummonerId, Is.Not.Null.And.Not.Empty);
            Assert.That(@event.Timestamp, Is.Not.EqualTo(default(DateTime)));
        }
コード例 #31
0
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     appWarpResponse+="onJoinLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n";
     Debug.Log ("onJoinLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner());
 }
コード例 #32
0
 public void onUnSubscribeLobbyDone(LobbyEvent eventObj)
 {
     notifications+="onSubscribeLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n";
 }
コード例 #33
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     appWarpResponse+="onSubscribeLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n";
 }
コード例 #34
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     Log ("onSubscribeLobbyDone : " + eventObj.getResult());
     if(eventObj.getResult() == 0)
     {
         //WarpClient.GetInstance().JoinLobby();
     }
 }
コード例 #35
0
 public void onUnSubscribeLobbyDone(LobbyEvent eventObj)
 {
     Log ("onUnSubscribeLobbyDone : " + eventObj.getResult());
 }
コード例 #36
0
 //LobbyRequestListener
 public void onJoinLobbyDone(LobbyEvent eventObj)
 {
     Log ("onJoinLobbyDone : " + eventObj.getResult());
     if(eventObj.getResult() == 0)
     {
         //state = 1;
     }
 }
コード例 #37
0
 public void onLeaveLobbyDone(LobbyEvent eventObj)
 {
     Log ("onLeaveLobbyDone : " + eventObj.getResult());
 }
コード例 #38
0
 public void onSubscribeLobbyDone(LobbyEvent eventObj)
 {
     if (OnSubscribeLobbyDone != null)
         OnSubscribeLobbyDone(eventObj);
 }
コード例 #39
0
 public void onUnSubscribeLobbyDone(LobbyEvent eventObj)
 {
     if (OnJoinLobbyDone != null)
         onJoinLobbyDone(eventObj);
 }
コード例 #40
0
 public void onLeaveLobbyDone(LobbyEvent eventObj)
 {
     if (OnLeaveLobbyDone != null)
         OnLeaveLobbyDone(eventObj);
 }
コード例 #41
0
ファイル: LobbyReqListen.cs プロジェクト: Katry4/WinRepo
 public void onGetLiveLobbyInfoDone(LobbyEvent eventObj)
 {
     WarpClient.GetInstance().SetCustomUserData("dc", "good lad");
 }
コード例 #42
0
ファイル: LobbyReqListen.cs プロジェクト: Katry4/WinRepo
 public void onLeaveLobbyDone(LobbyEvent eventObj)
 {
 }
コード例 #43
0
ファイル: LobbyReqListen.cs プロジェクト: Katry4/WinRepo
 public void onUnSubscribeLobbyDone(LobbyEvent eventObj)
 {
     WarpClient.GetInstance().SendChat("yo yo");
 }
コード例 #44
0
    public void onLeaveLobbyDone(LobbyEvent eventObj)
    {
        notifications+="onLeaveLobbyDone : " + eventObj.getResult()  + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n";

        Debug.Log ("onLeaveLobbyDone : " + eventObj.getResult()  + ", RoomName : " + eventObj.getInfo().getName() + ", RoomID : " + eventObj.getInfo().getId());
    }