public void Set(uint id, uint num) { mId = id; DBInstance.InstanceInfo info = DBManager.Instance.GetDB <DBInstance>().GetInstanceInfo(id); if (id == GameConstHelper.GetUint("GAME_WILD_DUNGEON_PRIMARY_ID")) { labelName.text = info.mName + string.Format(DBConstText.GetText("PRIMARY_TITLE_SUFFIX"), GameConstHelper.GetUint("GAME_WILD_PRIMARY_BATTLE_POWER")); } else { labelName.text = info.mName; } UIWIldSwitchLine.SetAmount(spriteProgress, num); if (WildManager.Instance.mCurrentLineId == id) { goHead.SetActive(true); RoleHelp.GetIconName(Game.GetInstance().LocalPlayerTypeID, texHead); goButton.SetActive(false); } else { goHead.SetActive(false); goButton.SetActive(true); if (id == WildManager.Instance.mCurrentWaitingLineId) { lableButton.text = xc.DBConstText.GetText("IN_QUEUE"); } else { lableButton.text = xc.DBConstText.GetText("GOTO"); } } }
/// <summary> /// 判断帮派篝火能否烤肉 /// </summary> public bool GuildBonfireCheckCanMeat(bool showTips) { uint num = 0; object[] param = { }; System.Type[] returnType = { typeof(uint) }; object[] objs = LuaScriptMgr.Instance.CallLuaFunction_return(LuaScriptMgr.Instance.Lua.Global, "GuildBonfireDataManager_GetMeatNum", param, returnType); if (objs != null && objs.Length > 0) { if (objs[0] != null) { num = (uint)objs[0]; } } uint maxNum = GameConstHelper.GetUint("GAME_GUILD_FIRE_MAX_MEAT_NUM"); bool ret = false; if (num < maxNum) { ret = true; } else { if (showTips == true) { UINotice.Instance.ShowMessage(string.Format(DBConstText.GetText("GUILD_FIRE_GET_MEAT_REACH_MAX"), maxNum)); } } return(ret); }
/// <summary> /// 优化大额数值的显示 /// 数量超过一万时,则显示为万,保留一位小数点,若小数位根据四舍五入取整后为0,则不显示小数位, 例如31000=3.1万;30100=3万 /// 超过一亿时,则显示为亿,保留一位小数点,若小数位根据四舍五入取整后为0,则不显示小数位 /// </summary> /// <param name="number"></param> /// <param name="decimalPlaces">小数的位数</param> /// <returns></returns> public static string GetLargeNumberString(ulong number, uint decimalPlaces = 1) { string str = string.Empty; string unit = ""; System.Text.StringBuilder formatStr = new System.Text.StringBuilder(); formatStr.Append("0."); for (uint i = 0; i < decimalPlaces; ++i) { formatStr.Append("#"); } if (number < 10000) { str = number.ToString(); } else if (number < 100000000) { str = Convert.ToDouble((double)number / 10000.0).ToString(formatStr.ToString()); unit = DBConstText.GetText("TEN_THOUSAND"); } else { str = Convert.ToDouble((double)number / 100000000.0).ToString(formatStr.ToString()); unit = DBConstText.GetText("HUNDRED_MILLION"); } str = str + unit; return(str); }
/// <summary> /// 传的时间戳 设置倒计时开始或者倒计时结束 /// </summary> /// <param name="time"></param> public void RestTime(uint start_cd, uint cd) { ZDetalRotation = 0; CDTime = 0; if (cd > Game.GetInstance().ServerTime) { Is_CD = true; CDTime = cd; StartTime = start_cd; gameObject.SetActive(true); var detal = (float)(CDTime - StartTime); var star_detal = Mathf.Abs((float)(Game.GetInstance().ServerTime - StartTime)); ZDetalRotation = (1 - star_detal / detal) * 360.0f; CdImageTrans.localEulerAngles = new Vector3(CdImageTrans.localEulerAngles.x, CdImageTrans.localEulerAngles.y, ZDetalRotation); CdImageTrans.gameObject.SetActive(true); State = LockState.CDIng; ClientEventMgr.GetInstance().UnsubscribeClientEvent((int)ClientEvent.CE_SERVER_TIME_CHANGED, OnServerTimeUpdate); ClientEventMgr.GetInstance().SubscribeClientEvent((int)ClientEvent.CE_SERVER_TIME_CHANGED, OnServerTimeUpdate); } else { Is_CD = false; CdImageTrans.localEulerAngles = new Vector3(CdImageTrans.localEulerAngles.x, CdImageTrans.localEulerAngles.y, 360); gameObject.SetActive(true); if (CdImageTrans != null && TimeText != null) { CdImageTrans.gameObject.SetActive(false); TimeText.text = DBConstText.GetText("BAG_UNLOCK1"); } State = LockState.CDEnd; } }
/// <summary> /// 点击选择服务器按钮 /// </summary> public void OnClickChooseServerButton() { if (mInDelayTime) { return; } GlobalConfig globalConfig = GlobalConfig.GetInstance(); if (globalConfig.IsEnterSDK) { if (!IsSDKWorking()) { if (string.IsNullOrEmpty(globalConfig.LoginInfo.AccName) == true) { //SDKControler.getSDKControler().loginSDK(OnLoginCallback); if (Const.Region != RegionType.KOREA) { UINotice.Instance.ShowMessage(DBConstText.GetText("PLEASE_LOGIN")); } } else { UIManager.GetInstance().ShowWindow("UIServerListWindow", 0); } } } else { UIManager.GetInstance().ShowWindow("UIServerListWindow", 0); } }
/// <summary> ///服务器更新时间 /// </summary> /// <param name="data"></param> void OnServerTimeUpdate(CEventBaseArgs data) { if (Is_CD == true) { if (CdImageTrans != null && TimeText != null) { if (CDTime < Game.GetInstance().ServerTime) { Is_CD = false; CdImageTrans.gameObject.SetActive(false); TimeText.text = DBConstText.GetText("BAG_UNLOCK1"); DetalTime = 0; CdImageTrans.localEulerAngles = new Vector3(CdImageTrans.localEulerAngles.x, CdImageTrans.localEulerAngles.y, 360); } else { var detal = (float)(CDTime - StartTime); var star_detal = Mathf.Abs((float)(Game.GetInstance().ServerTime - StartTime)); ZDetalRotation = (1 - star_detal / detal) * 360.0f; var cdEnd = CDTime - Game.GetInstance().ServerTime; CdImageTrans.localEulerAngles = new Vector3(CdImageTrans.localEulerAngles.x, CdImageTrans.localEulerAngles.y, ZDetalRotation); TimeText.text = DateHelper.GetMMSS(cdEnd); } } } }
/// <summary> /// 根据获取的服务器信息来进行登陆 /// </summary> public void LoginServer(ServerInfo serverInfo) { if (serverInfo == null) { GameDebug.LogError("Error, server info is null!!!"); UINotice.GetInstance().ShowMessage(DBConstText.GetText("PLEASE_SELECT_ONE_SERVER")); return; } if (m_LoadingIcon != null) { m_LoadingIcon.SetActive(true); } ServerListHelper.GetInstance().CheckServerStateAndEnter(serverInfo, (ServerInfo retServerInfo, bool canEnter) => { if (canEnter == false) { UIManager.Instance.ShowWaitScreen(false); if (m_LoadingIcon != null) { m_LoadingIcon.SetActive(false); } } }); // 点击登录按钮 ControlServerLogHelper.Instance.PostPlayerFollowRecord(PlayerFollowRecordSceneId.ClickLoginButton); }
protected override void ResetUI() { base.ResetUI(); uint killBossNum = InstanceManager.Instance.InstanceKillBossNum; uint bossNum = InstanceHelper.BossNum; mDescLabel.text = string.Format(DBConstText.GetText("SINGLE_TRIAL_INST_RESULT"), killBossNum, killBossNum + "/" + bossNum); // 掉落 RemoveAllDrops(); InstanceManager.Instance.SortDrops(); //foreach (PkgGoodsGive pkgGoodsGive in InstanceManager.Instance.InstanceDrops.Values) //{ // if (pkgGoodsGive != null) // { // GameObject obj = UIWidgetHelp.GetInstance().CreateGoodsGiveItem(pkgGoodsGive); // Transform trans = obj.transform; // mRewardItemGrid.AddChild(trans); // trans.localScale = new Vector3(80f / 95f, 80f / 95f, 1f); // obj.AddComponent<UIDragScrollView>(); // } //} mRewardItemGrid.Reposition(); mRewardItemScrollView.ScrollToTop(); }
/// <summary> /// 进入帮派红包雨 /// </summary> /// <param name="playJumpOutAnimation"></param> public static void EnterGuildRainRedPacket(bool playJumpOutAnimation = true) { if (SceneHelp.Instance.IsInGuildManor == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("GUILD_ALREADY_IN_GUILD_MANOR")); return; } if (SceneHelp.CheckCanSwitch(GameConst.WAR_TYPE_WILD, GameConst.WAR_SUBTYPE_GUILD_MANOR) == false) { return; } if (PKModeManagerEx.Instance.TryToOtherDungeonScene() == false) { return; } if (playJumpOutAnimation) { JumpToInstance(0, GameConst.WAR_TYPE_WILD, GameConst.WAR_SUBTYPE_GUILD_MANOR, () => { var pack = new C2SMoneyRainStart(); NetClient.GetBaseClient().SendData <C2SMoneyRainStart>(NetMsg.MSG_MONEY_RAIN_START, pack); }); } else { var pack = new C2SMoneyRainStart(); NetClient.GetBaseClient().SendData <C2SMoneyRainStart>(NetMsg.MSG_MONEY_RAIN_START, pack); } }
public void OnClicked(CEventBaseArgs args) { Actor localPlayer = Game.GetInstance().GetLocalPlayer(); if (localPlayer == null || localPlayer.IsDead() == true) { return; } if (args == null || args.arg == null) { return; } GameObject clickedObject = args.arg as GameObject; // 实际点击的是该组件的孩子 if (clickedObject == null || clickedObject.transform == null || clickedObject.transform.parent == null || clickedObject.transform.parent.gameObject == null || clickedObject.transform.parent.gameObject != this.gameObject) { return; } // 帮派篝火要判断是否还有烤肉次数和背包是否已满 if (mClass == "guild_league_fire") { if (GuildBonfireCheckCanMeat(true) == false) { return; } if (ItemManager.Instance.BagIsFull(1) == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("BAG_IS_FULL")); return; } } // 跨服boss大宝箱 if (mClass == "span_boss_big_box" || mClass == "span_boss_little_box") { if (CheckCanGetServerBossBox(true) == false) { return; } } mIsClickedTouch = true; if (!IsLocalPlayerCloseEnoughToEnter) { bool result = false; Vector3 pos = transform.position; pos = InstanceHelper.ClampInWalkableRange(pos, pos, out result); localPlayer.MoveCtrl.TryWalkToAlong(pos); } else { OnTouchEnter(); } }
public void refreshWarning() { if (warningOpen) { labelWarningOpen.text = DBConstText.GetText("OPEN_RED_NAME_WARN"); } else { labelWarningOpen.text = DBConstText.GetText("CLOSE_RED_NAME_WARN"); } }
public void StartInteract(bool isShowPauseAutoFightingTips = false) { // 帮派篝火要判断背包是否已满 if (mClass == "guild_league_fire") { if (ItemManager.Instance.BagIsFull(1) == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("BAG_IS_FULL")); return; } } // 跨服boss大宝箱 if (mClass == "span_boss_big_box" || mClass == "span_boss_little_box") { if (CheckCanGetServerBossBox(true) == false) { return; } } Actor localPlayer = Game.GetInstance().GetLocalPlayer(); if (localPlayer == null) { return; } if (mCollectMode == ECollectMode.Click) { CollectionObjectManager.Instance.HideCollectionBar(mId); } ClientEventMgr.Instance.FireEvent((int)ClientEvent.SHOW_INTERACT_BUTTON, new CEventEventParamArgs(false, "", mInteractButtonPic, mId)); if (mCollectTime > 0) { localPlayer.Stop(); localPlayer.MoveCtrl.TryWalkAlongStop(); TargetPathManager.Instance.TaskNavigationActive(false); InstanceManager.Instance.PauseAutoFighting(isShowPauseAutoFightingTips); localPlayer.BeginInteraction("action_1"); //localPlayer.AttackCtrl.Attack(1414); InterruptCollect(false); CommonSliderHelper.Start((int)mCollectTime, "", mInteractButtonPic, SendInterruptCollect, SendFinishCollect, false); mIsCollecting = true; SendStartInteract(); } else { SendFinishCollect(); } }
//-------------------------------------------------------- // 控件消息 //-------------------------------------------------------- void OnClickLoginButton() { if (mSelectedServerInfo != null) { LoginServer(mSelectedServerInfo); } else { UINotice.Instance.ShowMessage(DBConstText.GetText("PLEASE_SELECT_ONE_SERVER")); } }
public void OnCloseWarning() { warningOpen = !warningOpen; refreshWarning(); if (warningOpen) { UINotice.Instance.ShowMessage(DBConstText.GetText("REDNAME_ON")); } else { UINotice.Instance.ShowMessage(DBConstText.GetText("REDNAME_OFF")); } }
protected virtual void HandleServerData(ushort protocol, byte[] data) { switch (protocol) { case NetMsg.MSG_NWAR_DROP: { var pack = S2CPackBase.DeserializePack <S2CNwarDrop>(data); //GameDebug.LogError(">>>MSG_NWAR_DROP"); CreateDrops(pack.drops, (DropComponent.EDropType)pack.drop_type, pack.em_id); return; } case NetMsg.MSG_NWAR_PICK: { var pack = S2CPackBase.DeserializePack <S2CNwarPick>(data); //GameDebug.LogError("Recv MSG_NWAR_PICK: " + pack.oid + ", " + pack.drop_type); PickDropImpl(pack.uuid, pack.oid, (DropComponent.EDropType)pack.drop_type); return; } case NetMsg.MSG_NWAR_PICK_FAIL: { var pack = S2CPackBase.DeserializePack <S2CNwarPickFail>(data); if (pack.reason == 1) // 物品已消失 { DestroyDrop(pack.oid); UINotice.Instance.ShowMessage(DBConstText.GetText("DROP_IS_DISAPPEAR")); } else if (pack.reason == 2) // 物品拾取次数已满 { UINotice.Instance.ShowMessage(DBConstText.GetText("DROP_REACH_LIMIT")); DropComponent drop = InstanceDropManager.Instance.GetDrop(pack.oid); if (drop != null) { drop.CanPick = false; drop.CanNotPickReason = pack.reason; } } return; } default: break; } }
public void SetTimes(uint times) { var lst = DBManager.Instance.GetDB <DBEvilShop>().mData; if (!lst.ContainsKey(id)) { Debug.LogError(string.Format("evile shop id {0} not exist", id)); return; } var data = lst [id]; buy.text = string.Format("{0}({1}/{2})", DBConstText.GetText("BUY"), times, data.dailyLimit); btnBuy.isEnabled = times > 0; }
public string GetPeakLvDesc(uint lv) { string ret = string.Empty; var fmt = "{0}"; uint peakLv = 0; bool isPeak = TransferHelper.IsPeak(lv, out peakLv); if (isPeak) { fmt = DBConstText.GetText("UI_PLAYER_PEAK_LEVEL_FORMAT"); // 巅峰{0}级 } else { fmt = DBConstText.GetText("UI_PLAYER_LEVEL_FORMAT"); // {0}级 } return(string.Format(fmt, peakLv)); }
/// <summary> /// 进入帮派联赛 /// </summary> public static void EnterGuildLeague() { if (SceneHelp.Instance.IsInGuildLeagueInstance() == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("GUILD_ALREADY_IN_GUILD_LEAGUE")); return; } if (SceneHelp.CheckCanSwitch(GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_GUILD_LEAGUE) == false) { return; } JumpToInstance(0, GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_GUILD_LEAGUE, () => { var pack = new C2SGuildLeagueEnter(); NetClient.GetBaseClient().SendData <C2SGuildLeagueEnter>(NetMsg.MSG_GUILD_LEAGUE_ENTER, pack); }); }
private static void OnGetLoginNoticeInfo(string url, string error, string reply, object userData) { bool fromServerList = (bool)userData; if (string.IsNullOrEmpty(error) == false) { UIManager.Instance.ShowWaitScreen(false); GameDebug.LogError("获取游戏公告失败: " + error); string err = DBConstText.GetText("GET_LOGIN_NOTICE_INFO_FAIL"); #if UNITY_EDITOR err += error; #endif UIWidgetHelp.GetInstance().ShowNoticeDlg(err); return; } LoginNoticeData data; if (!CheckData(reply, out data)) { UIManager.Instance.ShowWaitScreen(false); GameDebug.LogError("获取游戏公告失败: " + error); string err = DBConstText.GetText("GET_LOGIN_NOTICE_INFO_FAIL"); UIWidgetHelp.GetInstance().ShowNoticeDlg(err); return; } if (AuditManager.Instance.AuditAndIOS() && SDKHelper.GetSwitchModel()) { return; } //获取成功解析成功 UIManager.Instance.ShowWindow("UILoginNoticeWindow", data, false); //if (string.IsNullOrEmpty(data.content) == false) //{ //} }
// 点击选择角色按钮 public void OnClickActor(int btnIdx) { if (btnIdx < Game.GetInstance().CharactorMaxCount) { OnClickActorImpl(btnIdx); } else { SetReomveBtnActive(false); string text = DBConstText.GetText("CREATE_ACTOR_SLOT_EMPTY"); if (string.IsNullOrEmpty(text)) { text = xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_92"); } UIWidgetHelp.GetInstance().ShowNoticeDlg(UINoticeWindow.EWindowType.WT_OK, text, null, null); } }
/// <summary> /// 进入婚宴副本 /// </summary> public static void EnterWeddingInstance() { if (SceneHelp.Instance.IsInWeddingInstance == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("INSTANCE_ALREADY_IN_IT")); return; } if (SceneHelp.CheckCanSwitch(GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_WEDDING) == false) { return; } JumpToInstance(0, GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_WEDDING, () => { var pack = new C2SDungeonWeddingEnter(); NetClient.GetBaseClient().SendData <C2SDungeonWeddingEnter>(NetMsg.MSG_DUNGEON_WEDDING_ENTER, pack); }); }
void FinishPickImmediately() { if (mDropInfo == null) { return; } if ((mDropInfo.type == GameConst.GIVE_TYPE_GOODS || mDropInfo.type == GameConst.GIVE_TYPE_EQUIP) && ItemManager.Instance.BagIsFull(1) == true) { UINotice.Instance.ShowMessage(DBConstText.GetText("BAG_IS_FULL")); return; } C2SNwarPick msg = new C2SNwarPick(); msg.oid = mDropInfo.oid; msg.drop_type = mDropType; NetClient.GetBaseClient().SendData <C2SNwarPick>(NetMsg.MSG_NWAR_PICK, msg); mHasSendPickPackage = true; mSendPickPackageTime = Time.realtimeSinceStartup; }
public void HandleBarDisappear(uint barId) { if (barId == mId) { if (mIsCollecting == true) { if (mClass == "guild_league_stone") { UINotice.Instance.ShowMessage(DBConstText.GetText("GUILD_LEAGUE_MINE_IS_COLLECTED")); } if (mClass == "span_boss_big_box" || mClass == "span_boss_little_box") { UINotice.Instance.ShowMessage(string.Format(DBConstText.GetText("SERVER_BOSS_COLLECT_FAIL"), mHeadName)); } } InterruptCollect(false); } }
public void BuyGood(uint id, uint whiteGold, uint diamond) { Actor local = Game.GetInstance().GetLocalPlayer(); if (LocalPlayerManager.Instance.LocalActorAttribute.Sin <= 0) { UINotice.Instance.ShowMessage(DBConstText.GetText("EVIL_TOO_LOW_TO_BUY")); return; } //deicide lastBuyGoodId = id; if (LocalPlayerManager.Instance.GetMoneyByConst(GameConst.MONEY_COIN) < whiteGold) { UIWidgetHelp.GetInstance().ShowNoticeDlg(xc.ui.ugui.UINoticeWindow.EWindowType.WT_OK_Cancel, string.Format(DBConstText.GetText("BUY_WITH_GOLD_ASK"), diamond), BuyWithDiamond, diamond); } else { BuyGood(id); } }
public bool UpdateRegionItem(GameObject go, int index) { if (index == 0) // 已有角色服务器 { UpdateOneRegionItem(go, index, DBConstText.GetText("HAVE_ROLE_REGION"), "Region_HaveRole", () => { ShowHaveRoleServerListPanel(); mCurSelectedRegionItemIndex = index; }); } else if (index == 1) // 推荐服务器 { Button button = UpdateOneRegionItem(go, index, DBConstText.GetText("RECOMMEND_REGION"), "Region_Recommend", () => { ShowRecommendServerListPanel(); mCurSelectedRegionItemIndex = index; }); if (mOriginalSelectedRegionItem == null) { mOriginalSelectedRegionItem = button.gameObject; } } else if (index > 1) // 普通的服务器 { if (mRegionList.Count > 0) { RegionInfo regionInfo = mRegionList[index - 2]; UpdateOneRegionItem(go, index, regionInfo.Name, "Region_" + regionInfo.Id, () => { ShowNormalServerListPanel(regionInfo.Id); mCurSelectedRegionItemIndex = index; }); } } return(true); }
public static string GetInstanceDifficultyName(uint instanceDifficulty) { string str = DBConstText.GetText("INST_DIFF_" + instanceDifficulty); if (string.IsNullOrEmpty(str) == false) { return(str); } return(xc.TextHelper.GetConstText("CODE_TEXT_LOCALIZATION_46")); // if (instanceDifficulty == 1) // return "普通"; // else if (instanceDifficulty == 2) // return "困难"; // else if (instanceDifficulty == 3) // return "专家"; // else if (instanceDifficulty == 4) // return "折磨"; // else if (instanceDifficulty == 5) // return "噩梦"; // // return "未知难度"; }
/// <summary> /// 停止拾取动画 /// </summary> /// <param name="is_break">是否是中断(若为false,则是正常结束动画)</param> /// <param name="exec_finish_action">是否停止拾取动作</param> public void StopAnim(bool is_break, bool exec_finish_action = false) { if (mTimer == null) { return; } //GameDebug.LogRed("StopAnim = " + is_break.ToString()); C2SNwarPickBossChipStop reply = new C2SNwarPickBossChipStop(); AudioManager.Instance.StopAudio_dynamic(m_pick_boss_sound_id); if (is_break) { UINotice.Instance.ShowMessage(DBConstText.GetText("WORLD_BOSS_PICK_STOP_TIPS")); reply.type = 1; } else { reply.type = 0; } NetClient.GetCrossClient().SendData <C2SNwarPickBossChipStop>(NetMsg.MSG_NWAR_PICK_BOSS_CHIP_STOP, reply); mTimer.Destroy(); mTimer = null; m_pick_boss_sound_id = 0; ClientEventMgr.Instance.FireEvent((int)(ClientEvent.CE_PICK_DROP_CONTROL_SLIDER), new CEventObjectArgs(false, 0)); if (exec_finish_action) { Actor actor = Game.Instance.GetLocalPlayer(); if (actor != null) { Player player = actor as Player; player.FinishPickUpEffect(); } } }
/// <summary> /// 进入破碎死域 /// </summary> public static void EnterDeadSpace() { if (SceneHelp.Instance.IsInDeadSpaceInstance == true) { xc.UINotice.Instance.ShowMessage(DBConstText.GetText("INSTANCE_ALREADY_IN_IT")); return; } if (SceneHelp.CheckCanSwitch(GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_DEAD_SPACE) == false) { return; } if (PKModeManagerEx.Instance.TryToOtherDungeonScene() == false) { return; } JumpToInstance(0, GameConst.WAR_TYPE_DUNGEON, GameConst.WAR_SUBTYPE_DEAD_SPACE, () => { var pack = new C2SDungeonDeadSpaceEnter(); NetClient.GetBaseClient().SendData <C2SDungeonDeadSpaceEnter>(NetMsg.MSG_DUNGEON_DEAD_SPACE_ENTER, pack); }); }
protected bool CheckWindowDownloaded(string winName) { // if (winName == "UIMountWindow") // { // var content = DBConstText.GetText("DOWNLOAD_PATCH_TIPS"); // ui.UIWidgetHelp.Instance.ShowNoticeDlg(ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, content, // (param) => // { // ui.ugui.UIManager.Instance.ShowSysWindow("UIPatchWindow", 1); // }, null); // return false; // } int patch_id = UIHelper.GetWindowPatchId(winName); if (patch_id >= 0) { bool is_loaded = xpatch.XPatchManager.Instance.IsPatchDownloaded(patch_id); // if(patch_id > 0) // is_loaded = false; if (is_loaded) { return(true); } else { //需要下载最新资源才能体验当前内容 var content = DBConstText.GetText("DOWNLOAD_PATCH_TIPS"); ui.UIWidgetHelp.Instance.ShowNoticeDlg(ui.ugui.UINoticeWindow.EWindowType.WT_OK_DisableCloseBtn, content, (param) => { ui.ugui.UIManager.Instance.ShowSysWindow("UIPatchWindow", patch_id); }, null); return(false); } } return(true); }
private void OnClickUserButton() { GlobalConfig globalConfig = GlobalConfig.GetInstance(); if (string.IsNullOrEmpty(globalConfig.LoginInfo.AccName) == true) { if (Const.Region != RegionType.KOREA) { UINotice.Instance.ShowMessage(DBConstText.GetText("PLEASE_LOGIN")); } } else { //if (SDKControler.getSDKControler().IsLoginSuccess) if (Const.Region == RegionType.KOREA) { DBOSManager.getDBOSManager().getBridge().logout(); } else { DBOSManager.getDBOSManager().getBridge().userCenter(); } } }