private bool CheckShowNextOpenSysTipIfLock(UIPlayerBar.BtnDestination btnDest) { int cfgID = LockSysHash.getConfigByBtnDestination(btnDest); if (cfgID != 0 && !LockSysHash.CanUnlock(cfgID)) { // 未解锁 UINextOpenTips.Show(cfgID); return(true); } return(false); }
/// <summary> /// 给新手引导用的, 提前或者推后入口层级 /// </summary> /// <param name="_dir"></param> /// _dir : true 是表示上面 /// _param : 层级偏移量 public void UpdateEntryLayer(UIPlayerBar.BtnDestination _dest, bool _dir, int _param) { int index = allElements.FindIndex(p => p.MyDest == _dest); if (index != -1) { Renderer[] renders = allElements[index].GetComponentsInChildren <Renderer>(); for (int i = 0; i < renders.Length; ++i) { renders[i].material.renderQueue = _dir? 3000 + _param : 3000; } } }
/// <summary> /// 分发同步的红点通知信息 /// </summary> /// <param name="_param"></param> public void OnSpreadNotification(UIPlayerBar.BtnDestination _param) { if (allElements != null && allElements.Count > 0) { int index = allElements.FindIndex(p => p.MyDest == _param); if (index != -1) { if (allElements[index].gameObject.activeSelf) { allElements[index].gameObject.SendMessage("OnUpdateUI", new KHEvent("None"), SendMessageOptions.DontRequireReceiver); } } } }
void OnBuildingButtonClickEvtRecived(KHEvent evt) { UIPlayerBar.BtnDestination tTargetDest = UIPlayerBar.BtnDestination.None; if ((evt.data as UIEntryButton) != null) { tTargetDest = ((UIEntryButton)evt.data).MyDest; } this.OnClickButton(tTargetDest); MessageManager.Instance.serializeToLocal( new MouseAction(this, RemoteModel.Instance.CurrentTime, tTargetDest), MessageManager.DEST_PATH_MOUSE_EVENT ); }
public MouseAction(UIMainPage componnet, ulong timeStamp, UIPlayerBar.BtnDestination targetDes) { targetComponentInfo = targetDes.ToString(); TimeStamp = timeStamp; mouseType = MouseType.UIMainPage; }
public void OnClickButton(UIPlayerBar.BtnDestination btnDest) { if (KHVer.IsOfflineMatch) { if (btnDest != UIPlayerBar.BtnDestination.Match && btnDest != UIPlayerBar.BtnDestination.PVPRealTime) { UIAPI.ShowMsgTip("赛事版本,该功能暂不开放"); return; } } UIEntryElement ele = null; mainPageEntrys.TryGetValue(btnDest, out ele); if (ele == null) { Debuger.Log("OnClickButton, btn:" + btnDest + ", not binding logic UIEntryElement"); return; } // 新手引导通知 if (btnDest != UIPlayerBar.BtnDestination.None) { KHUIManager.getInstance().dispatchClickToGuideEvent(ele.gameObject.tag); } // 如果未开启,则显示系统开启提示 if (CheckShowNextOpenSysTipIfLock(btnDest)) { return; } if (DefineExt.shieldSystemLst.Contains((uint)LockSysHash.StateBit_2_Excel[LockSysHash.BtnDestination_2_StateBit[btnDest]])) { UIAPI.ShowMsgTip("客户端不是最新版本,无法参加当前玩法,请更新版本后尝试"); return; } if (KHLowDeviceManager.GetLowDeviceShield((uint)LockSysHash.StateBit_2_Excel[LockSysHash.BtnDestination_2_StateBit[btnDest]])) { return; } if (false && !playerEntity.GetOpenInfo(LockSysHash.BtnDestination_2_StateBit[btnDest])) { int configId = LockSysHash.getConfigByBtnDestination(btnDest); FeatureUnlockConfig conf = null; GeneralTableConfig.getInstance().FeatureDefine.TryGetValue(configId, out conf); if (conf != null) { UIAPI.ShowMsgTip(conf.tip); } else { Debuger.LogWarning("未找到对应的解锁配置, Id = " + configId); } } switch (btnDest) { case UIPlayerBar.BtnDestination.None: break; case UIPlayerBar.BtnDestination.FullFood: KHPluginManager.Instance.SendMessage(FullFoodPlugin.NAME, "ShowView", new ShowViewArgument(UIDef.FULL_FOOD_MAIN_PANEL_VIEW)); break; case UIPlayerBar.BtnDestination.CityShop: KHPluginManager.Instance.SendMessage("Shop", "ShowView", new ShowViewArgument(UIDef.SHOP_UI, true, 1u)); break; case UIPlayerBar.BtnDestination.EliteLevel: KHPluginManager.Instance.SendMessage(LevelSelectPlugin.pluginName, "ShowView", new ShowViewArgument(UIDef.LEVEL_SELECT_CHAPTER, needBg: false, data: UILevelSelectMainView.LevelSelectMainViewTabEnum.Elite)); break; case UIPlayerBar.BtnDestination.Talent: KHPluginManager.Instance.SendMessage("NewTalentPlugin", "OpenSystem"); break; case UIPlayerBar.BtnDestination.MissonMode: UIAPI.ShowMsgTip("功能尚未开放"); break; case UIPlayerBar.BtnDestination.SurvivalChallenge: //KHPluginManager.Instance.SendMessage(SurvivalChallPlugin.pluginName, SurvivalChallOperation.OperRequestEnter); KHPluginManager.Instance.SendMessage("Mirage", "ShowView", new ShowViewArgument(UIDef.MIRAGE_PRACTICE_VIEW)); break; case UIPlayerBar.BtnDestination.MirageMode: KHPluginManager.Instance.SendMessage("Mirage", "Mirage.GetMirageData"); break; case UIPlayerBar.BtnDestination.NewPVPMode: KHPluginManager.Instance.SendMessage(PvPUIPlugin2.PluginName, "OpenSystem"); break; case UIPlayerBar.BtnDestination.PVPRealTime: //KHPluginManager.Instance.SendMessage("ArenaPlugin", "OpenHomeView"); KHUtil.GoToPvpMainView(null, true, true); break; case UIPlayerBar.BtnDestination.TeamPVE: KHPluginManager.Instance.SendMessage("TeamPVEUI", "ShowView", new ShowViewArgument(UIDef.TEAMPVE_MAIN_VIEW)); break; case UIPlayerBar.BtnDestination.Guild: KHPluginManager.Instance.SendMessage(GuildPlugin.pluginName, GuildOperation.ClickGuild, false); //KHPluginManager.Instance.GetPluginByName("DramaPlugin").ShowView("UILua/Drama/DramaView", false); break; case UIPlayerBar.BtnDestination.RankingView: KHPluginManager.Instance.SendMessage(RankListPlugin.NAME, "ShowView", new ShowViewArgument(UIDef.RANK_LIST_VIEW)); break; case UIPlayerBar.BtnDestination.NinjaTask: KHPluginManager.Instance.SendMessage(NinjaTaskPlugin.pluginName, NinjaTaskOperation.OpenNinjaTask); break; case UIPlayerBar.BtnDestination.TeamGroup: //KHPluginManager.Instance.SendMessage(GroupPlugin.pluginName, GroupOperation.ClickGroup); KHPluginManager.Instance.SendMessage("MysticalDuplicatePlugin", "OnOpen"); break; case UIPlayerBar.BtnDestination.Match: if (KHVer.IsOfflineMatch) { KHUtilForLua.SendMessageForLuaSystem("OfflineMatchPlugin", "OpenFirstView", null); } else { LuaSystemPlugin sysPlugin = KHPluginManager.Instance.GetPluginByName("MatchMainEntrancePlugin") as LuaSystemPlugin; sysPlugin.CallLuaFunctionToOperation("kihan.match.MatchMainEntranceOperation", "OpenSystem", null); } break; case UIPlayerBar.BtnDestination.KizunaContest: //KHPluginManager.Instance.SendMessage("KizunaContestEntrancePlugin", "TryEnter"); break; case UIPlayerBar.BtnDestination.GuildHegemony: KHPluginManager.Instance.SendMessage("GuildHegemonyPlugin", "Query"); break; case UIPlayerBar.BtnDestination.ZoneFightMatch: KHPluginManager.Instance.SendMessage(ZoneFightMatchPlugin.pluginName, ZoneFightMatchOperation.OpenEntranceView); break; case UIPlayerBar.BtnDestination.Main_NinjaFight: //KHPluginManager.Instance.SendMessage("MysticalDuplicatePlugin", "OnOpen"); KHPluginManager.Instance.SendMessage(TeamPlugin.pluginName, TeamOperation.EnterTeamScene); break; case UIPlayerBar.BtnDestination.Drama: KHUIManager.Instance.ShowFlyNext(true, () => { KHPluginManager.Instance.SendMessage("MainUI", "HideView", "MainUI"); KHPluginManager.Instance.SendMessage("MainUI", "HideView", "PlayerBarUI"); KHPluginManager.Instance.GetPluginByName("DramaPlugin").ShowView("UILua/Drama/DramaView", false); }); break; default: break; } }