public void PopUpBuyConfirm(long marketID, int market_count, int prop_count, ShopType type, int cost) { System.Action act = () => { GameEvents.BuyEvent.OnShopReq.SafeInvoke(marketID, market_count, market_count * prop_count, type); #if Test MarkeBuyResponse res = new global::MarkeBuyResponse(); res.ResponseStatus = new ResponseStatus(); res.ResponseStatus.Code = 0; MarkeBuyResponse(res); #else MarkeBuyRequest req = new MarkeBuyRequest(); req.MarketItemId = (int)marketID; req.Count = market_count; GameEvents.NetWorkEvents.SendMsg.SafeInvoke(req); #endif }; PopUpData pd = new PopUpData(); pd.title = "goods_buy"; pd.content = "shop_now_buying"; pd.twoStr = "shop_no"; pd.isOneBtn = false; pd.oneAction = act; PopUpManager.OpenPopUp(pd); }
private void OnAddClick(GameObject obj) { if (string.IsNullOrEmpty(m_input.Text)) { return; } long val; if (false == long.TryParse(m_input.Text, out val)) { return; } if (val == GlobalInfo.MY_PLAYER_ID) { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = "friend_number_self_ID"; pd.content_param0 = ""; pd.isOneBtn = true; pd.OneButtonText = "UI.OK"; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = null; PopUpManager.OpenPopUp(pd); return; } #if !TEST //CurViewLogic().RequestAddFriend(val); GameEvents.UIEvents.UI_Friend_Event.Listen_AddFriend.SafeInvoke(val); #endif }
public void RequestEnter() { #if OFFICER_SYS List <long> officeIDList = EventGamePoliceDispatchManager.Instance.GetAllDispathOfficersID(); if (officeIDList.Count == 0) { Dictionary <UBSParamKeyName, object> _params = new Dictionary <UBSParamKeyName, object>() { { UBSParamKeyName.Success, 0 }, { UBSParamKeyName.Description, UBSDescription.NO_OFFICER_SELECTED }, { UBSParamKeyName.SceneID, m_event_id } }; UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.event_begin, null, _params); PopUpManager.OpenPopUp(new PopUpData() { isOneBtn = true, content = "UI_ENTER_GAME_NO_OFFICE", }); return; } #endif CSEventEnterRequest req = new CSEventEnterRequest(); this.OnScHalfAsyncRequest(req, m_event_id); }
/// <summary> /// 资源服务器连接出错 /// </summary> private void AssetServerError(string errorMsg) { PopUpManager.OpenPopUp(new PopUpData() { content = errorMsg, isOneBtn = true, }); }
private static void PopupInfo(string content_, string content_param0_ = "") { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = content_; pd.content_param0 = content_param0_; pd.isOneBtn = true; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = null; PopUpManager.OpenPopUp(pd); }
public void OfflineTipsNoRetry() { EngineCore.EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SYNC_LOADING); PopUpData pd = new PopUpData(); pd.title = "NETWORK_TIME"; pd.content = "systen_unusual"; pd.content_param0 = null; pd.isOneBtn = true; pd.order_in_layer = 13000; PopUpManager.OpenPopUp(pd); }
public void OfflineTips() { HttpPingModule.Instance.Enable = false; EngineCore.EngineCoreEvents.UIEvent.HideUIEvent.SafeInvoke(UIDefine.UI_SYNC_LOADING); PopUpData pd = new PopUpData(); pd.title = "NETWORK_TIME"; pd.content = "systen_unusual"; pd.content_param0 = null; pd.isOneBtn = false; pd.twoStr = "close_button"; pd.order_in_layer = 13000; if (InOrOutScene.InScene == (InOrOutScene)((SceneModule.Instance.CurrentScene is GameSceneBase) ? 1 : 0)) { if (SceneBase.GameStatus.GAMEOVER != ((GameSceneBase)(SceneModule.Instance.CurrentScene)).CurGameStatus) { PauseGame(); pd.oneAction = SendNeedMoreTime; } else { pd.oneAction = TestNetworkAgain; } } else if (0 != LoadingManager.Instance.SCENE_ID) { PauseGame(); pd.oneAction = SendNeedMoreTime; } else { if (GameRoot.instance.GameFSM.CurrentState.StateFlag.Equals((int)ClientFSM.ClientState.LOGIN)) { pd.oneAction = null; ResetOfflineTime(); } else { pd.oneAction = TestNetworkAgain; } } pd.twoAction = BackToLogin; PopUpManager.OpenPopUp(pd); }
private void DelPopUp() { PopUpData pd = new PopUpData(); pd.title = string.Empty; pd.content = "friend_delete"; pd.isOneBtn = false; pd.OneButtonText = "shop_no"; pd.twoStr = "UI.OK"; pd.oneAction = null; pd.twoAction = delegate() { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.friend_unfriend.ToString()); GameEvents.UIEvents.UI_Friend_Event.OnInfoChanged.SafeInvoke(this.m_player_id, ENUM_INFO_CONTROL.E_DEL); }; PopUpManager.OpenPopUp(pd); }
private void TransactionTips(string desc_, bool ok_) { PopUpData pd = new PopUpData(); pd.title = "recharge_title"; if (ok_) { pd.content = "recharge_ok"; } else { pd.content = "recharge_fail"; } pd.content_param0 = desc_; pd.isOneBtn = true; PopUpManager.OpenPopUp(pd); }
private void OnClick(GameObject obj) { EngineCoreEvents.AudioEvents.PlayAudio.SafeInvoke(Audio.AudioType.UISound, GameCustomAudioKey.game_star.ToString()); if (m_item_in_bag_num >= m_item_cost_num) { CurViewLogic().StartGame(); } else { PopUpData pd = new PopUpData() { title = string.Empty, content = "action_pt_mp", isOneBtn = true, OneButtonText = "UI.OK", }; PopUpManager.OpenPopUp(pd); } }
private void BackToLogin(string title_, string content_) { System.Action act = () => { BigWorldManager.Instance.ClearBigWorld(); EngineCoreEvents.ResourceEvent.LeaveScene.SafeInvoke(); FrameMgr.Instance.HideAllFrames(new List <string>() { UIDefine.UI_GUEST_LOGIN, UIDefine.UI_GM, UIDefine.UI_GUID }); TimeModule.Instance.SetTimeout(() => GameRoot.instance.GameFSM.GotoState((int)ClientFSM.ClientState.LOGIN), 1.0f); }; PopUpData pd = new PopUpData(); pd.title = title_; pd.content = content_; pd.isOneBtn = true; pd.oneAction = act; PopUpManager.OpenPopUp(pd); }