public static void OnSuccess(IMessage s) { string pop_str = string.Empty; string pop_param = string.Empty; if (s is SCFriendResponse) { var rsp = s as SCFriendResponse; if (FriendReqType.Agreeing == rsp.Type) { //if (PlayerPrefTool.RefreshApplicationNoticeTime()) // pop_str = "friend_ask_seven"; } } else if (s is SCFriendAddResponse) { pop_str = "friend_ask_for"; } else if (s is SCFriendDelResponse) { } else if (s is SCFriendAgreeResponse) { pop_str = "friend_add_ok"; } else if (s is SCFriendDelApplyResponse) { } else if (s is SCFriendGiftResponse) { } else if (s is SCFriendGiftSendResponse) { pop_str = "friend_gift_send"; pop_param = FriendDataManager.Instance.Send_gift_left_num.ToString(); } else if (s is SCFriendGiftDrawResponse) { } else if (s is SCFriendViewResponse) { } else if (s is SCFriendRecommendApplyResponse) { pop_str = "friend_ask_for"; WaveTipHelper.LoadWaveContent(pop_str); return; } if (!string.IsNullOrEmpty(pop_str)) { PopupInfo(pop_str, pop_param); } }
private void OnSkillFinish(long propId) { if (propId == m_bagData.prop.prop.id) { if (m_bagData.prop.prop.type == 0) { WaveTipHelper.LoadWaveContent("bag_energy_use", ConfSkill.Get(m_bagData.prop.prop.skillId).gain); } else { WaveTipHelper.LoadWaveContent("bag_prop_use"); } //PopUpManager.OpenNormalOnePop("afewfewfe"); GlobalInfo.MY_PLAYER_INFO.ReducePropForBag(propId, m_curNum); GameEvents.UIEvents.UI_Bag_Event.OnPropCost.SafeInvoke(m_bagData.prop.prop.id); EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_BAGUSE); } }
private void OnClick(GameObject objs) { CheckCurrentTask(); if (this.m_buildState == 1) { CommonHelper.OpenEnterGameSceneUI(this.m_enterdata.m_sceneID); } else if (this.m_buildState == 2) { NormalTask taskInfo = TaskQueryManager.Instance.GetCurrentMainTaskInfo(); TaskHelper.AcceptTask(taskInfo); //CSCanTaskRequest req = new CSCanTaskRequest(); //req.TaskId = taskInfo.TaskConfID; //GameEvents.NetWorkEvents.SendMsg.SafeInvoke(req); } else { WaveTipHelper.LoadWaveContent("scene_locked", Widget.position); } }
private void OnRes(object obj) { if (obj is PlayerPropSellResposne) { PlayerPropSellResposne res = (PlayerPropSellResposne)obj; WaveTipHelper.LoadWaveContent("Successful_sale"); GlobalInfo.MY_PLAYER_INFO.ChangeCoin(m_bagData.prop.prop.price * m_curNum); GlobalInfo.MY_PLAYER_INFO.ReducePropForBag(m_bagData.prop.prop.id, m_curNum); GameEvents.UIEvents.UI_Bag_Event.OnPropCost.SafeInvoke(m_bagData.prop.prop.id); EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_BAGUSE); } else if (obj is SCDropResp) { SCDropResp res = (SCDropResp)obj; FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_GIFTRESULT); param.Param = res; EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param); OnSkillFinish(m_bagData.prop.prop.id); GameEvents.PlayerEvents.RequestLatestPlayerInfo.SafeInvoke(); } }
protected virtual void OneUseReqCallback(long id) { if (m_itemdata == null || null == m_itemdata.m_prop) { return; } if (id == m_itemdata.m_prop.id && 1 == m_itemdata.m_number) { ConfProp confProp = ConfProp.Get(m_itemdata.m_prop.id); if (confProp != null && (confProp.type == 0 || confProp.type == 8)) { ConfSkill confSkill = ConfSkill.Get(confProp.skillId); if (confSkill != null) { WaveTipHelper.LoadWaveContent("food_add_1", confSkill.gain); } } GlobalInfo.MY_PLAYER_INFO.ReducePropForBag(id); GameEvents.UIEvents.UI_Bag_Event.OnPropCost.SafeInvoke(m_itemdata.m_prop.id); this.SwitchButton(); } }