//--------------------------一些操作------------------------------------------------------ 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); }
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); }
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("温馨提示", "您的天赋槽已全部打开!"); } }
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); }
public void onEventShowUserInfo(object data) { SelfData self = Account.getSelfData(); //已经可以更新用户相关界面信息 LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.UPDATE_USER_INFO, (object)self); }
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); }
//LobbyRequestListener public void onJoinLobbyDone(LobbyEvent eventObj) { Log("onJoinLobbyDone : " + eventObj.getResult()); if (eventObj.getResult() == 0) { } }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { if (eventObj.getResult() == 0) { // Debug.Log("Lobby is subscribe"); } }
//--------------------------一些操作------------------------------------------------------ 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); }
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; } }
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(); }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { //Twist.AppController.showToast ("onSubscribeLobbyDone"); if (eventObj.getResult() == 0) { } }
void OnEnable() { addAllEvent(); initTalentPanel(); LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_USER_INFO, null); }
public void onJoinLobbyDone(LobbyEvent eventObj) { if (eventObj.getResult() == 0) { WarpClient.GetInstance().SubscribeLobby(); } }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { Log("onSubscribeLobbyDone : " + eventObj.getResult()); if (eventObj.getResult() == 0) { WarpClient.GetInstance().JoinLobby(); } }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { if (eventObj.getResult() == 0) { AppWarpManager.instance.isConnected = true; Log("subscription successful"); } }
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); }
//LobbyRequestListener #region LobbyRequestListener public void onJoinLobbyDone(LobbyEvent eventObj) { Debug.Log("onJoinLobbyDone : " + eventObj.getResult()); if (eventObj.getResult() == 0) { state = 1; } }
public static LobbyEvent EM() { if (_instance == null) { _instance = new LobbyEvent(); } return(_instance); }
//--------------------------一些操作------------------------------------------------------ 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); }
public void onJoinLobbyDone(LobbyEvent eventObj) { if (eventObj.getResult() == 0) { // Debug.Log("Lobby is Join"); WarpClient.GetInstance().SubscribeLobby(); //WarpClient.GetInstance ().GetOnlineUsers (); } }
public void onJoinLobbyDone(LobbyEvent eventObj) { //Twist.AppController.showToast ("onJoinLobbyDone"); if (eventObj.getResult() == 0) { WarpClient.GetInstance().SubscribeLobby(); WarpClient.GetInstance().GetOnlineUsers(); } }
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); }
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); }
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); }
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); } }
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); }
//--------------------------一些操作------------------------------------------------------ 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); }
void OnEnable() { for (int i = 0; i < 4; i++) { // _realPlayer [i] = null; } addAllEvent(); LobbyEvent.EM().InvokeEvent(LobbyEvent.EVENT.SHOW_PLAZA, null); }
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))); }
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()); }
public void onUnSubscribeLobbyDone(LobbyEvent eventObj) { notifications+="onSubscribeLobbyDone : " + eventObj.getResult() + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n"; }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { appWarpResponse+="onSubscribeLobbyDone : " + eventObj.getResult() + ", Name : " + eventObj.getInfo().getName() + ", Id : " + eventObj.getInfo().getId()+" owner "+eventObj.getInfo().getRoomOwner()+"\n"; }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { Log ("onSubscribeLobbyDone : " + eventObj.getResult()); if(eventObj.getResult() == 0) { //WarpClient.GetInstance().JoinLobby(); } }
public void onUnSubscribeLobbyDone(LobbyEvent eventObj) { Log ("onUnSubscribeLobbyDone : " + eventObj.getResult()); }
//LobbyRequestListener public void onJoinLobbyDone(LobbyEvent eventObj) { Log ("onJoinLobbyDone : " + eventObj.getResult()); if(eventObj.getResult() == 0) { //state = 1; } }
public void onLeaveLobbyDone(LobbyEvent eventObj) { Log ("onLeaveLobbyDone : " + eventObj.getResult()); }
public void onSubscribeLobbyDone(LobbyEvent eventObj) { if (OnSubscribeLobbyDone != null) OnSubscribeLobbyDone(eventObj); }
public void onUnSubscribeLobbyDone(LobbyEvent eventObj) { if (OnJoinLobbyDone != null) onJoinLobbyDone(eventObj); }
public void onLeaveLobbyDone(LobbyEvent eventObj) { if (OnLeaveLobbyDone != null) OnLeaveLobbyDone(eventObj); }
public void onGetLiveLobbyInfoDone(LobbyEvent eventObj) { WarpClient.GetInstance().SetCustomUserData("dc", "good lad"); }
public void onLeaveLobbyDone(LobbyEvent eventObj) { }
public void onUnSubscribeLobbyDone(LobbyEvent eventObj) { WarpClient.GetInstance().SendChat("yo yo"); }
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()); }