Core/Camera/CameraSwitch.cs
@@ -25,7 +25,7 @@ private void OnWindowOpen(Window _window) { cameraActive = !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin(); cameraActive = !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin(); if (!cameraActive) { @@ -40,7 +40,7 @@ private void OnWindowClose(Window _window) { cameraActive = !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin(); cameraActive = !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin(); if (!cameraActive) { Core/GameEngine/Login/Launch.cs
@@ -884,9 +884,6 @@ { expectTime = timer; DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); var launchBackGroundWin = WindowCenter.Instance.Get<LaunchBackGroundWin>(); launchBackGroundWin.transform.SetAsFirstSibling(); } public override void Update() Core/GameEngine/Login/LoginStage.cs
@@ -13,14 +13,8 @@ checkClientTimer = Time.time + 60f; checkAssetVersionTimer = Time.time + 70f; WindowCenter.Instance.Open<MessageWin>(); WindowCenter.Instance.Close<FightingPKWin>(); WindowCenter.Instance.Open<LaunchBackGroundWin>(true); var backGroundWin = WindowCenter.Instance.Get<LaunchBackGroundWin>(); if (backGroundWin != null) { backGroundWin.ShowLoginEffect(); } if (VersionUtility.Instance.InIosAuditTime()) { @@ -55,7 +49,6 @@ } SoundPlayer.Instance.PlayLoginMusic(); if (VersionUtility.Instance.NeedDownAsset() && !AssetVersionUtility.hasDownLoadFullAsset) { InGameDownLoad.Instance.inGameDownLoadAllow = true; @@ -63,7 +56,6 @@ } MapTransferUtility.Instance.Clear(); //PreFightMission.Instance.Destroy(); } public override void UnInitialize() @@ -115,8 +107,6 @@ float checkAssetVersionTimer = 0f; private void CheckClientAssets() { if (Time.time > checkAssetVersionTimer) { checkAssetVersionTimer += Time.time + 5f; Core/NetworkPackage/DTCFile/ClientPack.meta
File was deleted Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0431_tagTimeTick.cs
@@ -19,8 +19,8 @@ { case HeavenBattleModel.HEAVEBATTLE_MAPID: ModelCenter.Instance.GetModel<HeavenBattleModel>().SetBattleStart(); WindowCenter.Instance.CloseImmediately<DungeonBeginCoolDownWin>(); WindowCenter.Instance.CloseImmediately<DungeonEndCoolDownWin>(); WindowCenter.Instance.Close<DungeonBeginCoolDownWin>(); WindowCenter.Instance.Close<DungeonEndCoolDownWin>(); if (!WindowCenter.Instance.IsOpen<BattlePrepareCoolDownWin>()) { WindowCenter.Instance.Open<BattlePrepareCoolDownWin>(); @@ -37,8 +37,8 @@ switch (mapId) { case CrossServerOneVsOneModel.CrossServerDataMapId: WindowCenter.Instance.CloseImmediately<DungeonEndCoolDownWin>(); WindowCenter.Instance.CloseImmediately<DungeonBeginCoolDownWin>(); WindowCenter.Instance.Close<DungeonEndCoolDownWin>(); WindowCenter.Instance.Close<DungeonBeginCoolDownWin>(); break; } } Core/NetworkPackage/DTCFile/ServerPack/HAD_SaleActivity.meta
File was deleted Core/NetworkPackage/DTCFile/ServerPack/HAE_Truck.meta
File was deleted Core/NetworkPackage/DTCFile/ServerPack/HAF_Merge.meta
File was deleted Core/NetworkPackage/DTCFile/ServerPack/HB0_Event.meta
File was deleted Core/NetworkPackage/ServerPack/HAD_SaleActivity.meta
File was deleted Core/NetworkPackage/ServerPack/HAE_Truck.meta
File was deleted Core/NetworkPackage/ServerPack/HAF_Merge.meta
File was deleted Core/NetworkPackage/ServerPack/HB0_Event.meta
File was deleted Fight/Stage/Dungeon/DungeonStage.cs
@@ -239,7 +239,7 @@ SnxxzGame.Instance.StartCoroutine(Co_EnterDungeon(mapId)); break; case 31170: WindowCenter.Instance.CloseImmediately<DungeonStageTimeWin>(); WindowCenter.Instance.Close<DungeonStageTimeWin>(); break; case GatherSoulDungeonModel.DUNGEON_MAPID: WindowCenter.Instance.Open<GatherSoulDungeonStageTimeWin>(); Lua/Gen/LuaWindowUtilityWrap.cs
File was deleted Lua/Gen/SnxxzUIWindowCenterWrap.cs
File was deleted Lua/Gen/SnxxzUIWindowCenterWrap.cs.meta
File was deleted Lua/Gen/XLuaGenAutoRegister.cs
File was deleted Lua/Gen/XLuaGenAutoRegister.cs.meta
File was deleted Lua/LuaWindowUtility.cs
@@ -6,14 +6,9 @@ [XLua.LuaCallCSharp] public class LuaWindowUtility { public static Window Open(string _name, bool _forceSync = false, int _functionalOrder = 0) public static void Open(string _name, bool _forceSync = false, int _functionalOrder = 0) { return WindowCenter.Instance.Open(_name, _forceSync, _functionalOrder); } public static Window OpenWithoutAnimation(string _name) { return WindowCenter.Instance.OpenWithoutAnimation(_name); WindowCenter.Instance.Open(_name, _forceSync, _functionalOrder); } public static Window Get(string _name) @@ -21,15 +16,14 @@ return WindowCenter.Instance.Get(_name); } public static Window Close(string _name) public static void Close(string _name) { return WindowCenter.Instance.Close(_name); WindowCenter.Instance.Close(_name); } public static void CloseAll() { WindowCenter.Instance.CloseAll(); } public static void DestroyWin(string _name) System/Activity/ActivityModel.cs
@@ -88,7 +88,7 @@ activityNotifies.Clear(); if (WindowCenter.Instance.IsOpen<ActivityNotifyWin>()) { WindowCenter.Instance.CloseImmediately<ActivityNotifyWin>(); WindowCenter.Instance.Close<ActivityNotifyWin>(); } } private bool mainStage = false; @@ -139,7 +139,7 @@ activityNotifies.Clear(); if (WindowCenter.Instance.IsOpen<ActivityNotifyWin>()) { WindowCenter.Instance.CloseImmediately<ActivityNotifyWin>(); WindowCenter.Instance.Close<ActivityNotifyWin>(); } } } System/AssetVersion/InGameDownLoad.cs
@@ -548,7 +548,7 @@ return false; } if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) if (WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { return false; } System/BlastFurnace/BlastFurnaceModel.cs
@@ -256,7 +256,7 @@ { if (WindowCenter.Instance.IsOpen<MakerDrugSuccessWin>()) { WindowCenter.Instance.CloseImmediately<MakerDrugSuccessWin>(); WindowCenter.Instance.Close<MakerDrugSuccessWin>(); } } } System/BossShow/BossShowModel.cs
@@ -82,8 +82,8 @@ if (WindowCenter.Instance.IsOpen<TreasureBaseWin>()) { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.CloseImmediately<TreasureSelectWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureSelectWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } @@ -387,7 +387,7 @@ } else if (!_show && WindowCenter.Instance.IsOpen<BossShowDialogueWin>()) { WindowCenter.Instance.CloseImmediately<BossShowDialogueWin>(); WindowCenter.Instance.Close<BossShowDialogueWin>(); } } System/Chat/ChatBubblePreviewWin.cs
@@ -78,7 +78,7 @@ CloseImmediately(); if (WindowCenter.Instance.IsOpen<ChatExtentWin>()) { WindowCenter.Instance.CloseImmediately<ChatExtentWin>(); WindowCenter.Instance.Close<ChatExtentWin>(); } WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.Jump); } System/Chat/ChatCenter.cs
@@ -764,7 +764,7 @@ private void CheckChatFloatOpen() { if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !WindowCenter.Instance.IsOpen<LoadingWin>() if (WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() && !WindowCenter.Instance.IsOpen<LoadingWin>() && StageLoad.Instance.currentStage is DungeonStage && !WindowCenter.Instance.IsOpen<TreasureBaseWin>()) { if (!WindowCenter.Instance.IsOpen<ChatFloatWin>()) @@ -776,7 +776,7 @@ { if (WindowCenter.Instance.IsOpen<ChatFloatWin>()) { WindowCenter.Instance.CloseImmediately<ChatFloatWin>(); WindowCenter.Instance.Close<ChatFloatWin>(); } } } @@ -811,7 +811,7 @@ return; } if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>() || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() || WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() || StageLoad.Instance.isLoading || NewBieCenter.Instance.inGuiding) { System/Chat/ChatSendComponent.cs
@@ -232,7 +232,7 @@ } else { WindowCenter.Instance.CloseImmediately<ChatExtentWin>(); WindowCenter.Instance.Close<ChatExtentWin>(); if (parent != null) { parent.transform.localPosition = parent.transform.localPosition.SetY(0); System/Chat/FairyChatWin.cs
@@ -77,7 +77,7 @@ MessageWin.Inst.ShowFixedTip(Language.Get("L1136", limit)); return; } WindowCenter.Instance.CloseImmediately<SocialWin>(); WindowCenter.Instance.Close<SocialWin>(); WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionFunc3); } System/ClientVersion/VersionUtility.cs
@@ -280,7 +280,7 @@ if (_ok) { step = Step.Completed; WindowCenter.Instance.CloseImmediately<VersionUpdateWin>(); WindowCenter.Instance.Close<VersionUpdateWin>(); SDKUtility.Instance.InstallAPK(GetApkLocalUrl()); } else System/Compose/New/ComposeSelectItemCell.cs
@@ -109,7 +109,7 @@ break; } selectModel.UpdateSelectItem(itemModel.itemInfo.ItemPlace); WindowCenter.Instance.CloseImmediately<SelectItemWin>(); WindowCenter.Instance.Close<SelectItemWin>(); } } } System/Compose/New/ComposeWin.cs
@@ -10,7 +10,8 @@ using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { namespace Snxxz.UI { public class ComposeWin : Window { @@ -39,8 +40,7 @@ #endregion ComposeWinModel _composeModel; ComposeWinModel ComposeModel { ComposeWinModel ComposeModel { get { return _composeModel ?? (_composeModel = ModelCenter.Instance.GetModel<ComposeWinModel>()); } } @@ -49,7 +49,7 @@ #region Built-in protected override void BindController() { } protected override void AddListeners() @@ -103,16 +103,16 @@ { ComposeModel.SetCurComposeModel(null); } } protected override void OnActived() { base.OnActived(); if (functionOrder == 0 && !WindowJumpMgr.Instance.IsJumpState) { if(ComposeModel.composeToolRed.state == RedPointState.Simple) if (ComposeModel.composeToolRed.state == RedPointState.Simple) { _itemUITitleType.state = TitleBtnState.Click; functionOrder = _itemUITitleType.order; @@ -156,14 +156,14 @@ protected override void OnAfterOpen() { } protected override void OnPreClose() { ComposeModel.ResetJumpToModel(); selectModel.ClearSelectModel(); } protected override void OnAfterClose() @@ -191,68 +191,36 @@ private void ClickDogzEquipCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<ComposeDogzEquipWin>(); } else { WindowCenter.Instance.Open<ComposeDogzEquipWin>(); } WindowCenter.Instance.Open<ComposeDogzEquipWin>(); functionOrder = _dogzEquipFunc.order; } private void OnClickItemCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<ComposeToolsWin>(); } else { WindowCenter.Instance.Open<ComposeToolsWin>(); } WindowCenter.Instance.Open<ComposeToolsWin>(); functionOrder = _itemUITitleType.order; } private void OnClickEquipCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<ComposeEquipWin>(); } else { WindowCenter.Instance.Open<ComposeEquipWin>(); } WindowCenter.Instance.Open<ComposeEquipWin>(); functionOrder = _equipUITitleType.order; } private void OnClickGodEquipCompose() { functionOrder = _godequipUITitleType.order; } private void OnClickTicketCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<ComposeTicketWin>(); } else { WindowCenter.Instance.Open<ComposeTicketWin>(); } WindowCenter.Instance.Open<ComposeTicketWin>(); functionOrder = _ticketUITitleType.order; } @@ -260,29 +228,15 @@ private void OnClickWingsCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<ComposeWingsWin>(); } else { WindowCenter.Instance.Open<ComposeWingsWin>(); } WindowCenter.Instance.Open<ComposeWingsWin>(); functionOrder = _wingsUITitleType.order; } private void GatherSoulCompose() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<GatherSoulComposeWin>(); } else { WindowCenter.Instance.Open<GatherSoulComposeWin>(); } WindowCenter.Instance.Open<GatherSoulComposeWin>(); functionOrder = m_GatherSoulCompose.order; } @@ -291,7 +245,7 @@ private void CloseSubWindows() { var children = WindowConfig.Get().FindChildWindows("ComposeWin"); foreach(var window in children) foreach (var window in children) { WindowCenter.Instance.Close(window); } @@ -299,7 +253,7 @@ public void OnClickCloseBtn() { if(ComposeModel.CurComposeModel != null) if (ComposeModel.CurComposeModel != null) { ComposeModel.SetCurComposeModel(null); } System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -225,7 +225,7 @@ { if(WindowCenter.Instance.IsOpen<CrossServerOneVsOneRoundWin>()) { WindowCenter.Instance.CloseImmediately<CrossServerOneVsOneRoundWin>(); WindowCenter.Instance.Close<CrossServerOneVsOneRoundWin>(); } if (!WindowCenter.Instance.IsOpen<CrossServerOneVsOneStartFightWin>()) System/CrossServerOneVsOne/CrossServerOneVsOneRewardModel.cs
@@ -152,7 +152,7 @@ { if (WindowCenter.Instance.IsOpen<CrossServerOneVsOneRoundWin>()) { WindowCenter.Instance.CloseImmediately<CrossServerOneVsOneRoundWin>(); WindowCenter.Instance.Close<CrossServerOneVsOneRoundWin>(); } WindowCenter.Instance.Open<CrossServerSettlementWin>(); } System/CrossServerOneVsOne/CrossServerOneVsOneWin.cs
@@ -55,11 +55,11 @@ protected override void OnActived() { } protected override void OnAfterOpen() { } protected override void OnPreClose() @@ -101,7 +101,7 @@ UpdateScore(); UpdateRank(); UpdateHonor(); switch(funcId) switch (funcId) { case 0: case 1: @@ -148,14 +148,7 @@ { if (honorStore_SelectImg.activeInHierarchy) return; CloseSubWindows(); if (crossServerWin.windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CrossServerOneVsOneHonorStoreWin>(); } else { WindowCenter.Instance.Open<CrossServerOneVsOneHonorStoreWin>(); } WindowCenter.Instance.Open<CrossServerOneVsOneHonorStoreWin>(); honorStore_SelectImg.SetActive(true); } @@ -164,14 +157,7 @@ if (seasonAward_SelectImg.activeInHierarchy) return; CloseSubWindows(); if (crossServerWin.windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<SeasonRewardWin>(); } else { WindowCenter.Instance.Open<SeasonRewardWin>(); } WindowCenter.Instance.Open<SeasonRewardWin>(); seasonAward_SelectImg.SetActive(true); } @@ -186,14 +172,7 @@ if (arena_SelectImg.activeInHierarchy) return; CloseSubWindows(); if (crossServerWin.windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CrossServerOneVsOneArenaWin>(); } else { WindowCenter.Instance.Open<CrossServerOneVsOneArenaWin>(); } WindowCenter.Instance.Open<CrossServerOneVsOneArenaWin>(); arena_SelectImg.SetActive(true); } @@ -202,23 +181,16 @@ if (rankAward_SelectImg.activeInHierarchy) return; CloseSubWindows(); if (crossServerWin.windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<SegmentRewardWin>(); } else { WindowCenter.Instance.Open<SegmentRewardWin>(); } WindowCenter.Instance.Open<SegmentRewardWin>(); rankAward_SelectImg.SetActive(true); } private void CloseSubWindows() { WindowCenter.Instance.CloseImmediately<CrossServerOneVsOneArenaWin>(); WindowCenter.Instance.CloseImmediately<CrossServerOneVsOneHonorStoreWin>(); WindowCenter.Instance.CloseImmediately<SeasonRewardWin>(); WindowCenter.Instance.CloseImmediately<SegmentRewardWin>(); WindowCenter.Instance.Close<CrossServerOneVsOneArenaWin>(); WindowCenter.Instance.Close<CrossServerOneVsOneHonorStoreWin>(); WindowCenter.Instance.Close<SeasonRewardWin>(); WindowCenter.Instance.Close<SegmentRewardWin>(); arena_SelectImg.SetActive(false); rankAward_SelectImg.SetActive(false); seasonAward_SelectImg.SetActive(false); System/DailyQuest/DailyQuestWin.cs
@@ -238,23 +238,23 @@ GotoHeavenBattleDungeon(_id); break; case DailyQuestType.Prayer: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<WelfareWin>(false, 1); WindowCenter.Instance.Close<MainInterfaceWin>(); break; case DailyQuestType.WorldBoss: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<FindPreciousFrameWin>(); break; case DailyQuestType.DemonJar: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<LootPreciousFrameWin>(); break; case DailyQuestType.FairyTask: WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionTask); break; case DailyQuestType.FairyLeague: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<UnionPanel>(false, 4); break; case DailyQuestType.FairyFeast: @@ -268,23 +268,23 @@ break; case DailyQuestType.RuneTowerSweep: RuneTowerWin.guideSweep = true; WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<TowerWin>(false,0); break; case DailyQuestType.BossHome: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 1); break; case DailyQuestType.PersonalBoss: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 2); break; case DailyQuestType.ElderGodArea: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 3); break; case DailyQuestType.RuneTower: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<TowerWin>(false, 0); break; case DailyQuestType.TreasureCollectSoul: @@ -298,29 +298,29 @@ WindowCenter.Instance.Open<DungeonAssistWin>(); break; case DailyQuestType.FairyGrabBoss: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1); break; case DailyQuestType.KillMonster: var point = mapModel.GetRecommendHangPoint(); var mapEventConfig = Config.Instance.Get<MapEventPointConfig>(point); mapModel.wannaLookLocalMap = mapEventConfig.MapID; WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<LocalMapWin>(); break; case DailyQuestType.GatherSoulDungeon: GotoNormalDungeon(_id, 0); break; case DailyQuestType.CrossServerPk: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<CrossServerWin>(); break; case DailyQuestType.JadeDynastyBoss: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 3); break; case DailyQuestType.JadeDynastyTower: WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<TowerWin>(false, 1); break; default: @@ -465,7 +465,7 @@ private void GotoBlastStove() { WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<BlastFurnaceWin>(); } @@ -479,7 +479,7 @@ else { taskModel.DailyBountyMove(); WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } } @@ -494,7 +494,7 @@ else { taskModel.DailyFairyTaskMove(); WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } } @@ -555,7 +555,7 @@ } } WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); if (gotoTreasureId == 0) { System/Dogz/DogzWin.cs
@@ -98,7 +98,7 @@ funcBtnGroup.TriggerByOrder(order); if(WindowCenter.Instance.IsOpen<DogzPackWin>()) { WindowCenter.Instance.CloseImmediately<DogzPackWin>(); WindowCenter.Instance.Close<DogzPackWin>(); } } System/Dogz/SelectCell.cs
@@ -39,13 +39,13 @@ } selectBtn.RemoveAllListeners(); selectBtn.AddListener(()=> selectBtn.AddListener((UnityEngine.Events.UnityAction)(()=> { List<int> indexlist = new List<int>(); indexlist.Add(model.itemInfo.ItemPlace); dogzModel.SendPutOnEquip(indexlist); WindowCenter.Instance.CloseImmediately<SelectDogzItemWin>(); }); WindowCenter.Instance.Close<SelectDogzItemWin>(); })); } } } System/Dungeon/AncientKingBehaviour.cs
@@ -43,7 +43,7 @@ { if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>()) { WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>(); WindowCenter.Instance.Close<DungeonAncientKingWin>(); } else { System/Dungeon/DungeonAssistModel.cs
@@ -502,7 +502,7 @@ { if (WindowCenter.Instance.IsOpen<DungeonAssistPlayerWin>()) { WindowCenter.Instance.CloseImmediately<DungeonAssistPlayerWin>(); WindowCenter.Instance.Close<DungeonAssistPlayerWin>(); } } else System/Dungeon/DungeonAssistWin.cs
@@ -188,7 +188,7 @@ WindowJumpMgr.Instance.ClearJumpData(); if (WindowCenter.Instance.IsOpen<DailyQuestWin>()) { WindowCenter.Instance.CloseImmediately<DailyQuestWin>(); WindowCenter.Instance.Close<DailyQuestWin>(); } CloseClick(); } System/Dungeon/DungeonDefeatedWin.cs
@@ -59,7 +59,7 @@ if (iceCrystalVeinModel.IsIceCrystalVein_Copy) { iceCrystalVeinModel.IsIceCrystalVein_Copy = false; iceCrystalVeinModel.IsIceCrystalVeinCopy = true; PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin"); } } System/Dungeon/DungeonFightWin.cs
@@ -172,7 +172,7 @@ if (iceCrystalVeinModel.IsIceCrystalVein_Copy) { iceCrystalVeinModel.IsIceCrystalVein_Copy = false; iceCrystalVeinModel.IsIceCrystalVeinCopy = true; PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin"); } } @@ -351,7 +351,7 @@ ConfirmCancel.ShowRuneTowerPopConfirm( Language.Get("Mail101"), Language.Get("RuneTower25", config.Fightpower), (bool ok) => (Action<bool>)((bool ok) => { if (ok) { @@ -365,7 +365,7 @@ { model.ExitCurrentDungeon(); } } }) ); } } @@ -451,7 +451,7 @@ { if (WindowCenter.Instance.IsOpen<DungeonAncientAchieveWin>()) { WindowCenter.Instance.CloseImmediately<DungeonAncientAchieveWin>(); WindowCenter.Instance.Close<DungeonAncientAchieveWin>(); } else { System/Dungeon/DungeonLiquidCell.cs
@@ -188,18 +188,18 @@ ItemConfig _useItemCfg = Config.Instance.Get<ItemConfig>(itemModel.itemId); if (buffid != 0 && buffid != _useItemCfg.AddSkill1) { ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("FairyLand_Func22"), (bool isOk) => ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("FairyLand_Func22"), (System.Action<bool>)((bool isOk) => { if (isOk) { WindowCenter.Instance.CloseImmediately<DungeonUseLiquidWin>(); WindowCenter.Instance.Close<DungeonUseLiquidWin>(); PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace); } }); })); } else { WindowCenter.Instance.CloseImmediately<DungeonUseLiquidWin>(); WindowCenter.Instance.Close<DungeonUseLiquidWin>(); PackSendQuestMgr.Instance.SendMakeUseQuest(itemModel.itemInfo.ItemPlace); } } System/Dungeon/DungeonVictoryWin.cs
@@ -118,7 +118,7 @@ if (iceCrystalVeinModel.IsIceCrystalVein_Copy) { iceCrystalVeinModel.IsIceCrystalVein_Copy = false; iceCrystalVeinModel.IsIceCrystalVeinCopy = true; PopupWindowsProcessor.Instance.Add("IceCrystalVeinWin"); } } System/Dungeon/TargetBriefInfoWin.cs
@@ -12,8 +12,8 @@ public class TargetBriefInfo { public static int selectedNpcId { get; private set; } public static PlayerInfo playerInfo { get; private set; } public static MonsterInfo bossInfo { get; private set; } public static void Init() { @@ -36,93 +36,92 @@ if (_show) { selectedNpcId = _npcId; var boss = GAMgr.Instance.GetBySID(_instanceId) as GActorNpcFight; if (boss != null) { bossInfo = new MonsterInfo() { instanceId = _instanceId, npcId = _npcId, hp = boss.ActorInfo.RealHp, maxHp = boss.ActorInfo.RealMaxHp, level = boss.ActorInfo.LV }; } else { bossInfo = default(MonsterInfo); } playerInfo = default(PlayerInfo); } else { selectedNpcId = 0; if (bossInfo.instanceId == _instanceId) { bossInfo = default(MonsterInfo); } } var mapId = PlayerDatas.Instance.baseData.MapID; var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDataMapIdByMapId(mapId); var dataMapId = MapUtility.GetDataMapId(mapId); if (dataMapId == DemonJarModel.DEMONJAR_MAPID || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP || dataMapId == JadeDynastyTowerModel.DATA_MAPID) { if (_show) { DemonJarBossLifeBarWin win; if (!WindowCenter.Instance.IsOpen<DemonJarBossLifeBarWin>()) { win = WindowCenter.Instance.Open<DemonJarBossLifeBarWin>(true); } else { win = WindowCenter.Instance.Get<DemonJarBossLifeBarWin>(); } win.InitBossLifeBar(); WindowCenter.Instance.Open<DemonJarBossLifeBarWin>(); } } else { TargetBriefInfoWin win; if (!WindowCenter.Instance.IsOpen<TargetBriefInfoWin>()) { win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } else { win = WindowCenter.Instance.Get<TargetBriefInfoWin>(); } win.ShowBossLifeBar(_instanceId, _npcId, _show); WindowCenter.Instance.Open<TargetBriefInfoWin>(); } } static void OnRefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp) public static void OnRefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp) { if (CrossServerUtility.IsCrossServerOneVsOne()) { return; } selectedNpcId = _npcId; playerInfo = default(PlayerInfo); var boss = GAMgr.Instance.GetBySID(_instanceId) as GActorNpcFight; if (boss != null) { bossInfo = new MonsterInfo() { instanceId = _instanceId, npcId = _npcId, hp = boss.ActorInfo.RealHp, maxHp = boss.ActorInfo.RealMaxHp, level = boss.ActorInfo.LV }; } else { bossInfo = default(MonsterInfo); } var mapId = PlayerDatas.Instance.baseData.MapID; var dataMapId = ModelCenter.Instance.GetModel<DungeonModel>().GetDataMapIdByMapId(mapId); var dataMapId = MapUtility.GetDataMapId(mapId); if (dataMapId == DemonJarModel.DEMONJAR_MAPID || dataMapId == JadeDynastyBossModel.JADEDYNASTY_MAP || dataMapId == JadeDynastyTowerModel.DATA_MAPID) { DemonJarBossLifeBarWin win; if (!WindowCenter.Instance.IsOpen<DemonJarBossLifeBarWin>()) if (!WindowCenter.Instance.IsOpen("DemonJarBossLifeBarWin")) { win = WindowCenter.Instance.Open<DemonJarBossLifeBarWin>(true); WindowCenter.Instance.Open<DemonJarBossLifeBarWin>(); } else { win = WindowCenter.Instance.Get<DemonJarBossLifeBarWin>(); } win.RefreshBossLifeBar(); } else { if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.SelectTarget != null && PlayerDatas.Instance.hero.SelectTarget.ServerInstID == TargetBriefInfoWin.currentBossInstanceId) if (!WindowCenter.Instance.IsOpen("TargetBriefInfoWin")) { TargetBriefInfoWin win; if (!WindowCenter.Instance.IsOpen<TargetBriefInfoWin>()) { win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } else { win = WindowCenter.Instance.Get<TargetBriefInfoWin>(); } win.RefreshBossLifeBar(_instanceId, _npcId, _hp, _maxHp); WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } } @@ -135,22 +134,42 @@ return; } if (_show) { var player = GAMgr.Instance.GetBySID(_instanceId) as GActorPlayerBase; if (player != null) { playerInfo = new PlayerInfo() { instanceId = _instanceId, job = player.ActorInfo.Job, name = player.ActorInfo.PlayerName, level = player.ActorInfo.LV, hp = player.ActorInfo.RealHp, maxHp = player.ActorInfo.RealMaxHp }; } else { playerInfo = default(PlayerInfo); } bossInfo = default(MonsterInfo); } else { if (playerInfo.instanceId == _instanceId) { playerInfo = default(PlayerInfo); } } if (WindowCenter.Instance.IsOpen("DemonJarBossLifeBarWin")) { WindowCenter.Instance.Close<DemonJarBossLifeBarWin>(); } TargetBriefInfoWin win; if (!WindowCenter.Instance.IsOpen<TargetBriefInfoWin>()) { win = WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } else { win = WindowCenter.Instance.Get<TargetBriefInfoWin>(); } win.ShowPlayerLifeBar(_instanceId, _show); WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } static void OnRefreshPlayerLifeBar(uint _instanceId, ulong _hp, ulong _maxHp) @@ -160,12 +179,89 @@ return; } var win = WindowCenter.Instance.Get<TargetBriefInfoWin>(); if (win != null) bossInfo = default(MonsterInfo); var player = GAMgr.Instance.GetBySID(_instanceId) as GActorPlayerBase; if (player != null) { win.RefreshPlayerLifeBar(_instanceId, _hp, _maxHp); playerInfo = new PlayerInfo() { instanceId = _instanceId, job = player.ActorInfo.Job, name = player.ActorInfo.PlayerName, level = player.ActorInfo.LV, hp = player.ActorInfo.RealHp, maxHp = player.ActorInfo.RealMaxHp }; } else { playerInfo = default(PlayerInfo); } if (!WindowCenter.Instance.IsOpen<TargetBriefInfoWin>()) { WindowCenter.Instance.Open<TargetBriefInfoWin>(true); } } public struct MonsterInfo { public uint instanceId; public int npcId; public ulong hp; public ulong maxHp; public int level; public static bool operator ==(MonsterInfo lhs, MonsterInfo rhs) { return lhs.instanceId == rhs.instanceId && lhs.npcId == rhs.npcId && lhs.hp == rhs.hp && lhs.maxHp == rhs.maxHp && lhs.level == rhs.level; } public static bool operator !=(MonsterInfo lhs, MonsterInfo rhs) { return lhs.instanceId != rhs.instanceId || lhs.npcId != rhs.npcId || lhs.hp != rhs.hp || lhs.maxHp != rhs.maxHp || lhs.level != rhs.level; } } public struct PlayerInfo { public uint instanceId; public ulong hp; public ulong maxHp; public int job; public int level; public string name; public static bool operator ==(PlayerInfo lhs, PlayerInfo rhs) { return lhs.instanceId == rhs.instanceId && lhs.hp == rhs.hp && lhs.maxHp == rhs.maxHp && lhs.job == rhs.job && lhs.level == rhs.level && lhs.name == rhs.name; } public static bool operator !=(PlayerInfo lhs, PlayerInfo rhs) { return lhs.instanceId != rhs.instanceId || lhs.hp != rhs.hp || lhs.maxHp != rhs.maxHp || lhs.job != rhs.job || lhs.level != rhs.level || lhs.name != rhs.name; } } } namespace Snxxz.UI @@ -180,8 +276,8 @@ [SerializeField] PlayerLifeBar m_PlayerLifeBar; [SerializeField] FairyGrabBossBuffTip m_FairyGrabBossBuffTip; public static uint currentBossInstanceId = 0; public static uint currentPlayerInstanceId = 0; TargetBriefInfo.PlayerInfo playerInfo; TargetBriefInfo.MonsterInfo bossInfo; #region Built-in protected override void BindController() @@ -215,97 +311,132 @@ base.OnActived(); this.transform.SetAsFirstSibling(); playerInfo = TargetBriefInfo.playerInfo; bossInfo = TargetBriefInfo.bossInfo; if (playerInfo.instanceId != 0) { ShowPlayerLifeBar(playerInfo, true); } else { ShowPlayerLifeBar(playerInfo, false); if (bossInfo.instanceId != 0) { ShowBossLifeBar(bossInfo, true); } else { ShowBossLifeBar(bossInfo, false); } } } protected override void LateUpdate() { base.LateUpdate(); if (TargetBriefInfo.bossInfo != bossInfo) { if (TargetBriefInfo.bossInfo.instanceId == 0) { ShowBossLifeBar(TargetBriefInfo.bossInfo, false); } else { if (bossInfo.npcId != TargetBriefInfo.bossInfo.npcId) { ShowBossLifeBar(TargetBriefInfo.bossInfo, true); } else { RefreshBossLifeBar(TargetBriefInfo.bossInfo); } } bossInfo = TargetBriefInfo.bossInfo; } if (TargetBriefInfo.playerInfo != playerInfo) { if (TargetBriefInfo.playerInfo.instanceId == 0) { ShowPlayerLifeBar(TargetBriefInfo.playerInfo, false); } else { if (playerInfo.instanceId != TargetBriefInfo.playerInfo.instanceId) { ShowPlayerLifeBar(TargetBriefInfo.playerInfo, true); } else { RefreshPlayerLifeBar(TargetBriefInfo.playerInfo); } } playerInfo = TargetBriefInfo.playerInfo; } } #endregion public void ShowBossLifeBar(uint _instanceId, int _npcId, bool _show) void ShowBossLifeBar(TargetBriefInfo.MonsterInfo bossInfo, bool show) { if (_show) if (show) { if (_instanceId == currentBossInstanceId) { return; } currentBossInstanceId = _instanceId; m_ContainerPlayer.gameObject.SetActive(false); m_ContainerBoss.gameObject.SetActive(true); m_FairyGrabBossBuffTip.Init(); var boss = GAMgr.Instance.GetBySID(_instanceId) as GActorNpcFight; if (boss != null) { m_BossLifeBar.SetBaseInfo(_npcId, boss.ActorInfo.RealHp, boss.ActorInfo.RealMaxHp, boss.ActorInfo.LV); } m_ElderGodAnger.Display(_npcId); m_FairyGrabBossBuffTip.Display(_npcId); m_BossLifeBar.SetBaseInfo(bossInfo.npcId, bossInfo.hp, bossInfo.maxHp, bossInfo.level); m_ElderGodAnger.Display(bossInfo.npcId); m_FairyGrabBossBuffTip.Display(bossInfo.npcId); } else { m_ContainerBoss.gameObject.SetActive(false); m_FairyGrabBossBuffTip.UnInit(); currentBossInstanceId = 0; } } public void RefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp) void RefreshBossLifeBar(TargetBriefInfo.MonsterInfo bossInfo) { if (_instanceId != currentBossInstanceId) { return; } m_ContainerBoss.gameObject.SetActive(true); m_BossLifeBar.Show(_hp, _maxHp); m_BossLifeBar.Show(bossInfo.hp, bossInfo.maxHp); } public void ShowPlayerLifeBar(uint _instanceId, bool _show) void ShowPlayerLifeBar(TargetBriefInfo.PlayerInfo playerInfo, bool show) { if (_show) if (show) { var player = GAMgr.Instance.GetBySID(_instanceId) as GActorPlayerBase; m_ContainerPlayer.gameObject.SetActive(true); m_ContainerBoss.gameObject.SetActive(false); m_FairyGrabBossBuffTip.UnInit(); if (_instanceId != currentPlayerInstanceId && player != null) { currentPlayerInstanceId = _instanceId; var instanceId = playerInfo.instanceId; var job = playerInfo.job; var playerName = playerInfo.name; var playerLevel = playerInfo.level; var playerHp = playerInfo.hp; var playerMaxHp = playerInfo.maxHp; m_ContainerPlayer.gameObject.SetActive(true); m_ContainerBoss.gameObject.SetActive(false); m_FairyGrabBossBuffTip.UnInit(); var job = player.ActorInfo.Job; var reincarnationLv = player.ActorInfo.ReincarnationLv; var playerName = player.ActorInfo.PlayerName; var playerLevel = player.ActorInfo.LV; var playerHp = player.ActorInfo.RealHp; var playerMaxHp = player.ActorInfo.RealMaxHp; m_PlayerLifeBar.SetBaseInfo((int)_instanceId, job, reincarnationLv, playerName, playerLevel, playerHp, playerMaxHp); } m_PlayerLifeBar.SetBaseInfo((int)instanceId, job, 0, playerName, playerLevel, playerHp, playerMaxHp); } else { if (_instanceId == currentPlayerInstanceId) { m_ContainerPlayer.gameObject.SetActive(false); currentPlayerInstanceId = 0; } m_ContainerPlayer.gameObject.SetActive(false); } } public void RefreshPlayerLifeBar(uint _instanceId, ulong _hp, ulong _maxHp) void RefreshPlayerLifeBar(TargetBriefInfo.PlayerInfo playerInfo) { if (_instanceId != currentPlayerInstanceId) { return; } m_ContainerPlayer.gameObject.SetActive(true); m_PlayerLifeBar.Show(_hp, _maxHp); m_PlayerLifeBar.Show(playerInfo.hp, playerInfo.maxHp); } } System/FairyAu/FairyAuTaskWin.cs
@@ -209,8 +209,8 @@ SysNotifyMgr.Instance.ShowTip("CrossMap10"); return; } WindowCenter.Instance.CloseImmediately<UnionPanel>(); WindowCenter.Instance.CloseImmediately<FairyAuTaskWin>(); WindowCenter.Instance.Close<UnionPanel>(); WindowCenter.Instance.Close<FairyAuTaskWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); ObjectiveText.ExcuteHref(); TaskAllocation.Instance.TaskTime =TimeUtility.ServerNow; @@ -218,7 +218,7 @@ void CloseButton()//关闭按钮 { WindowCenter.Instance.CloseImmediately<FairyAuTaskWin>(); WindowCenter.Instance.Close<FairyAuTaskWin>(); } void CompleteTaskDeletion()//删除完成的任务 { System/FairyAu/FairyFeastTransmitShow.cs
@@ -295,7 +295,7 @@ IsOpen = false; model.TransmitComplete(); OpenUI(); WindowCenter.Instance.CloseImmediately<FairyFeastTransmitShowWin>(); WindowCenter.Instance.Close<FairyFeastTransmitShowWin>(); CameraController.Instance.CameraObject.gameObject.SetActive(true); StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent; transform.localPosition = new Vector3(0, 4000, 5000); System/FairyAu/FairyGrabBossModel.cs
@@ -347,7 +347,7 @@ grabBossHintOpen = false; if (WindowCenter.Instance.IsOpen<FairyGrabBossHintWin>()) { WindowCenter.Instance.CloseImmediately<FairyGrabBossHintWin>(); WindowCenter.Instance.Close<FairyGrabBossHintWin>(); } if (bossGrabHintEvent != null) { @@ -661,14 +661,14 @@ ConfirmCancel.ShowPopConfirm( Language.Get("Mail101"), tip, (bool _ok) => (Action<bool>)((bool _ok) => { if (_ok) { WindowCenter.Instance.Close<PetWin>(); MapTransferUtility.Instance.MoveToNPC(selectBoss); } } }) ); break; case 5: @@ -960,7 +960,7 @@ { return false; } if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) if (WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { return false; } System/FairyAu/FairyMemberWin.cs
@@ -98,7 +98,7 @@ { case PlayerDetails.DetailType.PrivateChat: { WindowCenter.Instance.CloseImmediately<UnionPanel>(); WindowCenter.Instance.Close<UnionPanel>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } break; System/FairyAu/FairyModel.cs
@@ -432,7 +432,7 @@ fairyRequestDict.Clear(); if (WindowCenter.Instance.IsOpen<FairyInviteWin>()) { WindowCenter.Instance.CloseImmediately<FairyInviteWin>(); WindowCenter.Instance.Close<FairyInviteWin>(); } if (UpdateFairyRequestEvent != null) { @@ -449,7 +449,7 @@ GameNetSystem.Instance.SendInfo(_pak); if (WindowCenter.Instance.IsOpen<FairyInviteWin>()) { WindowCenter.Instance.CloseImmediately<FairyInviteWin>(); WindowCenter.Instance.Close<FairyInviteWin>(); } } } System/FairyAu/KingFairyModel.cs
@@ -190,7 +190,7 @@ GameNetSystem.Instance.SendInfo(_pak); if (WindowCenter.Instance.IsOpen<KingFairyAllotWin>()) { WindowCenter.Instance.CloseImmediately<KingFairyAllotWin>(); WindowCenter.Instance.Close<KingFairyAllotWin>(); } } #endregion System/FairylandCeremony/FairylandCeremonyWin.cs
@@ -40,13 +40,13 @@ protected override void OnActived() { base.OnActived(); if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) if (!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) { if(ceremonyModel.rechargeRedp.state == RedPointState.Simple) if (ceremonyModel.rechargeRedp.state == RedPointState.Simple) { functionOrder = rechargeFunc.order; } else if(ceremonyModel.peopleRedp.state == RedPointState.Simple) else if (ceremonyModel.peopleRedp.state == RedPointState.Simple) { functionOrder = peopleToHiFunc.order; } @@ -56,17 +56,17 @@ protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() { if(!WindowJumpMgr.Instance.IsJumpState) if (!WindowJumpMgr.Instance.IsJumpState) { WindowCenter.Instance.Open<MainInterfaceWin>(); } @@ -85,56 +85,28 @@ private void ClickOutOf() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyOutOfPrintWin>(); } else { WindowCenter.Instance.Open<CeremonyOutOfPrintWin>(); } WindowCenter.Instance.Open<CeremonyOutOfPrintWin>(); functionOrder = 3; } private void ClickPeopleToHi() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyPeopleToHiWin>(); } else { WindowCenter.Instance.Open<CeremonyPeopleToHiWin>(); } WindowCenter.Instance.Open<CeremonyPeopleToHiWin>(); functionOrder = 2; } private void ClickFire() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyFirepartyWin>(); } else { WindowCenter.Instance.Open<CeremonyFirepartyWin>(); } WindowCenter.Instance.Open<CeremonyFirepartyWin>(); functionOrder = 1; } private void ClickRecharge() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyRechargeGiftWin>(); } else { WindowCenter.Instance.Open<CeremonyRechargeGiftWin>(); } WindowCenter.Instance.Open<CeremonyRechargeGiftWin>(); functionOrder = 0; } System/FakeDungeon/FakeDemonJarDungeonStage.cs
@@ -349,11 +349,7 @@ if (_victimId == boss.ServerInstID) { var lifeBar = WindowCenter.Instance.Get<DemonJarBossLifeBarWin>(); if (lifeBar != null) { lifeBar.RefreshBossLifeBar(); } TargetBriefInfo.OnRefreshBossLifeBar(_victimId, 0, 0, 0); } } System/FindPrecious/DemonJarBossLifeBarWin.cs
@@ -18,17 +18,22 @@ const long BOSSHP_TOTAL = 1000000000; [SerializeField] BossLifeBar m_BossLifeBar; TargetBriefInfo.MonsterInfo bossInfo; DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } } bool inited = false; long m_CurrentHp = BOSSHP_TOTAL; long currentHp { get { long currentHp { get { return m_CurrentHp; } set { set { if (value <= 0) { m_CurrentHp = 0; @@ -86,6 +91,15 @@ CloseClick(); } } if (TargetBriefInfo.bossInfo != bossInfo) { bossInfo = TargetBriefInfo.bossInfo; if (bossInfo.instanceId != 0) { RefreshBossLifeBar(); } } } #endregion @@ -108,10 +122,10 @@ public void InitBossLifeBar() { m_BossLifeBar.gameObject.SetActive(true); var npcConfig = Config.Instance.Get<NPCConfig>(TargetBriefInfo.selectedNpcId); var npcConfig = Config.Instance.Get<NPCConfig>(TargetBriefInfo.bossInfo.npcId); currentHp = (long)(model.mission.remainHPPer * 0.000001d * BOSSHP_TOTAL); m_BossLifeBar.SetBaseInfo(TargetBriefInfo.selectedNpcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV); m_BossLifeBar.SetBaseInfo(TargetBriefInfo.bossInfo.npcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV); inited = true; } System/FindPrecious/FindPreciousFrameWin.cs
@@ -113,11 +113,11 @@ private void CloseSubWindows() { WindowCenter.Instance.CloseImmediately<WorldBossWin>(); WindowCenter.Instance.CloseImmediately<BossHomeWin>(); WindowCenter.Instance.CloseImmediately<PersonalBossWin>(); WindowCenter.Instance.CloseImmediately<ElderGodAreaWin>(); WindowCenter.Instance.CloseImmediately<PreciousDropRecordWin>(); WindowCenter.Instance.Close<WorldBossWin>(); WindowCenter.Instance.Close<BossHomeWin>(); WindowCenter.Instance.Close<PersonalBossWin>(); WindowCenter.Instance.Close<ElderGodAreaWin>(); WindowCenter.Instance.Close<PreciousDropRecordWin>(); } private void ShowLastFunction() System/FindPrecious/FindPreciousModel.cs
@@ -661,7 +661,7 @@ return false; } if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) if (WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { return false; } System/FriendSystem/New/FriendsModel.cs
@@ -942,7 +942,7 @@ if (WindowCenter.Instance.IsOpen<SocialWin>()) { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<SocialWin>(); WindowCenter.Instance.Close<SocialWin>(); } WindowCenter.Instance.Open<ChatWin>(); } System/GatheringSoul/GatherSoulHoleBehaviour.cs
@@ -166,7 +166,7 @@ break; case ItemWinBtnType.putOff: { WindowCenter.Instance.CloseImmediately<GatherSoulTipWin>(); WindowCenter.Instance.Close<GatherSoulTipWin>(); GatherSoulItem item; if (model.TryGetItem(hole, out item)) { @@ -175,12 +175,12 @@ } break; case ItemWinBtnType.LevelUp: WindowCenter.Instance.CloseImmediately<GatherSoulTipWin>(); WindowCenter.Instance.Close<GatherSoulTipWin>(); GatherSoulLevelUpWin.selectHole = hole; WindowCenter.Instance.Open<GatherSoulLevelUpWin>(); break; case ItemWinBtnType.Replace: WindowCenter.Instance.CloseImmediately<GatherSoulTipWin>(); WindowCenter.Instance.Close<GatherSoulTipWin>(); GatherSoulEquipListWin.selectHole = hole; WindowCenter.Instance.Open<GatherSoulEquipListWin>(); break; System/HappyXB/HappyXBWin.cs
@@ -14,11 +14,11 @@ [SerializeField] Button closeBtn; [SerializeField] Button leftBtn; [SerializeField] Button rightBtn; HappyXBModel xBModel { get { return ModelCenter.Instance.GetModel<HappyXBModel>(); } } protected override void BindController() { } protected override void AddListeners() { @@ -38,7 +38,7 @@ protected override void OnActived() { base.OnActived(); if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) if (!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) { if (xBModel.bestXBRed.state == RedPointState.Simple) { @@ -61,12 +61,12 @@ } protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() { @@ -98,14 +98,7 @@ xBModel.title = HappXBTitle.Warehouse; CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<XBWarehouseWin>(); } else { WindowCenter.Instance.Open<XBWarehouseWin>(); } WindowCenter.Instance.Open<XBWarehouseWin>(); functionOrder = xbWarehouseTitle.order; } @@ -118,14 +111,7 @@ xBModel.title = HappXBTitle.Store; CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<XBStoreWin>(); } else { WindowCenter.Instance.Open<XBStoreWin>(); } WindowCenter.Instance.Open<XBStoreWin>(); functionOrder = xbStoreTitle.order; } @@ -133,14 +119,7 @@ { xBModel.title = HappXBTitle.Rune; CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<RuneXBWin>(); } else { WindowCenter.Instance.Open<RuneXBWin>(); } WindowCenter.Instance.Open<RuneXBWin>(); functionOrder = runeXBTitle.order; } @@ -148,14 +127,7 @@ { xBModel.title = HappXBTitle.Best; CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<BestXBWin>(); } else { WindowCenter.Instance.Open<BestXBWin>(); } WindowCenter.Instance.Open<BestXBWin>(); functionOrder = bestXBTitle.order; } System/JadeDynastyKnapSack/JadeDynastyEquipGetPathsWin.cs
@@ -134,20 +134,20 @@ if (pathConfig == null) return; pathText.text = pathConfig.name; pathBtn.AddListener(()=> pathBtn.AddListener((UnityEngine.Events.UnityAction)(()=> { WindowCenter.Instance.CloseImmediately<JadeDynastyEquipGetPathsWin>(); WindowCenter.Instance.Close<JadeDynastyEquipGetPathsWin>(); WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)pathConfig.OpenpanelId); }); })); } else { pathText.text = Language.Get("JadeDynastyEquip2",towerLayer); pathBtn.AddListener(() => pathBtn.AddListener((UnityEngine.Events.UnityAction)(() => { WindowCenter.Instance.CloseImmediately<JadeDynastyEquipGetPathsWin>(); WindowCenter.Instance.Close<JadeDynastyEquipGetPathsWin>(); WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.JadeDynastyTower288); }); })); } } } System/JadeDynastyKnapSack/JadeDynastyEquipModel.cs
@@ -271,7 +271,7 @@ int itemIndex = model.itemInfo.ItemPlace; jumpIndex = itemIndex / 5; WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<JadeDynastyKnapSackWin>(false,0); } } System/JadeDynastyKnapSack/JadeDynastyKnapSackWin.cs
@@ -43,12 +43,12 @@ protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() @@ -68,14 +68,7 @@ private void ClickFuncEquip() { CloseSubWindows(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<JadeDynastyEquipWin>(); } else { WindowCenter.Instance.Open<JadeDynastyEquipWin>(); } WindowCenter.Instance.Open<JadeDynastyEquipWin>(); functionOrder = funcEquip.order; } @@ -97,7 +90,7 @@ { CloseSubWindows(); CloseImmediately(); if(!WindowJumpMgr.Instance.IsJumpState) if (!WindowJumpMgr.Instance.IsJumpState) { WindowCenter.Instance.Open<MainInterfaceWin>(); } System/JadeDynastyTower/JadeDynastyTowerModel.cs
@@ -134,6 +134,7 @@ if (specialUnLockFloor == 0) { openJadeDynastyTower = true; PopupWindowsProcessor.Instance.Add("TowerWin",1); } } @@ -188,6 +189,7 @@ if (config.unLockEquipPlace > 0) { specialUnLockFloor = highestPassFloor; PopupWindowsProcessor.Instance.Add("JadeDynastyTowerUnLockWin"); } } } System/KnapSack/Logic/BoxGetItemWin.cs
@@ -59,7 +59,7 @@ protected override void OnPreOpen() { startPos = getItemParent.anchoredPosition3D; WindowCenter.Instance.CloseImmediately<NewItemGetWin>(); WindowCenter.Instance.Close<NewItemGetWin>(); //playerPack.ItemCntReduceAct += RefreshUI; getItem.SetActive(false); BoxModel.RefreshGetItemAct += RefreshGetIem; System/KnapSack/Logic/PlayerPackModels.cs
@@ -429,7 +429,7 @@ case 221: if (WindowCenter.Instance.IsOpen<KnapSackWin>()) { WindowCenter.Instance.CloseImmediately<KnapSackWin>(); WindowCenter.Instance.Close<KnapSackWin>(); } break; } System/KnapSack/New/BagWin.cs
@@ -12,9 +12,11 @@ using UnityEngine.EventSystems; using Snxxz.UI; namespace Snxxz.UI { namespace Snxxz.UI { public class BagWin : TempKnapSackBasic { public class BagWin : TempKnapSackBasic { #region 成员变量 [SerializeField] @@ -26,41 +28,40 @@ private bool isDoubleClick = false; ItemTipsModel _itemTipsModel; ItemTipsModel itemTipsModel { get { ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } } PlayerPackModel _playerPack; PlayerPackModel playerPack { PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } PackModelInterface _modelInterface; PackModelInterface modelInterface { PackModelInterface modelInterface { get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); } } private GridCell _lookEquipCell = null; #region Built-in protected override void BindController() { protected override void BindController() { _gridlineCtrl.OnRefreshCell += OnRefreshGridCell; _gridlineCtrl.vertical = true; _gridlineCtrl.lockType = EnhanceLockType.KeepVertical; } protected override void AddListeners() { protected override void AddListeners() { } protected override void OnPreOpen() { protected override void OnPreOpen() { KnapsackTimeCDMgr.Instance.RefreshItemOverdueAct += RefreshRemainTime; playerPack.RefreshBagEvent += RefreshBagInfo; @@ -69,13 +70,11 @@ playerPack.RefreshPackAct += RefreshPackModel; playerPack.GridRefreshEvent += OnPackCanUseGrid; } protected override void OnAfterOpen() { Transform parent = WindowCenter.Instance.Get<KnapSackWin>().transform; this.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one); this.transform.SetAsLastSibling(); protected override void OnAfterOpen() { OnRefrenshUIModel(); if(KnapSackWin.titleType == KnapsackFuncTitle.bag if (KnapSackWin.titleType == KnapsackFuncTitle.bag && LocalSave.GetString(PlayerPackModel.RecordKnapsackTitle) != KnapsackFuncTitle.depot.ToString()) { _gridlineCtrl.JumpIndex(0); @@ -85,8 +84,8 @@ LocalSave.SetString(PlayerPackModel.RecordKnapsackTitle, KnapSackWin.titleType.ToString()); } protected override void OnPreClose() { protected override void OnPreClose() { KnapsackTimeCDMgr.Instance.RefreshItemOverdueAct -= RefreshRemainTime; playerPack.RefreshItemCountAct -= OnAddItemCell; @@ -96,14 +95,27 @@ playerPack.RefreshBagEvent -= RefreshBagInfo; } protected override void OnAfterClose() { protected override void OnAfterClose() { UI3DModelExhibition.Instance.StopShow(); } protected override void OnActived() { base.OnActived(); var knapSackWin = WindowCenter.Instance.Get<KnapSackWin>(); if (knapSackWin != null) { Transform parent = knapSackWin.transform; this.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one); this.transform.SetAsLastSibling(); } } #endregion private void CheckAchieveJump() { if(AchievementGoto.guideAchievementId != 0) if (AchievementGoto.guideAchievementId != 0) { SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId); if (successConfig != null) @@ -122,11 +134,11 @@ } AchievementGoto.guideAchievementId = 0; } break; } } } } @@ -136,7 +148,8 @@ _gridlineCtrl.m_Scorller.RefreshActiveCellViews(); } public void OnRefrenshUIModel() { public void OnRefrenshUIModel() { packModel = playerPack.GetSinglePackModel(PackType.rptItem); OnCreateGridLineCell(_gridlineCtrl); } @@ -145,7 +158,7 @@ { if (playerPack.lookLineIndex > -1) { if(playerPack.lookLineIndex >= 4) if (playerPack.lookLineIndex >= 4) { _gridlineCtrl.JumpIndex(playerPack.lookLineIndex - 2); } @@ -153,11 +166,11 @@ { _gridlineCtrl.JumpIndex(playerPack.lookLineIndex); } } else { if (_lookEquipCell != null) { _lookEquipCell.uiEffect.Stop(); @@ -181,14 +194,14 @@ TimeSpan t; if (cool != null) { t = TimeSpan.FromSeconds(cool.GetRemainTime()); t = TimeSpan.FromSeconds(cool.GetRemainTime()); } else { t = TimeSpan.FromSeconds(0); } if(t.TotalSeconds <= 0) if (t.TotalSeconds <= 0) { OnRefrenshUIModel(); } @@ -196,21 +209,23 @@ #region 共用部分 public override void OnCreateGridLineCell(ScrollerController gridCtrl) { public override void OnCreateGridLineCell(ScrollerController gridCtrl) { base.OnCreateGridLineCell(gridCtrl); } public void OnRefreshGridCell(ScrollerDataType type, CellView cell) { public void OnRefreshGridCell(ScrollerDataType type, CellView cell) { int gridlineIndex = cell.index; int childCode = 0; if (packModel == null) { for (childCode = 0; childCode < cell.transform.childCount; childCode++) { GridCell gridCell = cell.transform.GetChild(childCode).GetComponent<GridCell>(); if(gridCell == null) if (gridCell == null) gridCell = cell.transform.GetChild(childCode).gameObject.AddComponent<GridCell>(); gridCell.cdImag.fillAmount = 0; @@ -219,16 +234,17 @@ gridCell.itemCell.gameObject.SetActive(false); gridCell.uiEffect.Stop(); } return; return; } for (childCode = 0; childCode < cell.transform.childCount; childCode++) { for (childCode = 0; childCode < cell.transform.childCount; childCode++) { GridCell gridCell = cell.transform.GetChild(childCode).GetComponent<GridCell>(); if (gridCell == null) gridCell = cell.transform.GetChild(childCode).gameObject.AddComponent<GridCell>(); int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1); gridCell.itemCell.gameObject.SetActive(false); if (cellCount > packModel.openGridCount) { @@ -245,28 +261,30 @@ if (itemModel != null) { gridCell.itemCell.gameObject.SetActive(true); gridCell.itemCell.Init(itemModel,true); gridCell.itemCell.Init(itemModel, true); gridCell.itemCellBtn.OnOneParaClick = null; gridCell.itemCellBtn.m_OnDbClick = null; if (KnapSackWin.titleType == KnapsackFuncTitle.depot) { gridCell.itemCellBtn.OnOneParaClick=(int info) => { gridCell.itemCellBtn.OnOneParaClick = (int info) => { itemTipsModel.SetItemTipsModel(PackType.rptItem, itemModel.itemInfo.ItemGUID, false, true); itemTipsModel.SetDepotBagTipsBtn(itemTipsModel.curAttrData); itemTipsModel.ShowUICtrl(); }; gridCell.itemCellBtn.m_OnDbClick=() => { PackSendQuestMgr.Instance.SendPutInQuest(ItemWinBtnType.putIn, itemModel.itemInfo.ItemGUID); }; gridCell.itemCellBtn.m_OnDbClick = () => { PackSendQuestMgr.Instance.SendPutInQuest(ItemWinBtnType.putIn, itemModel.itemInfo.ItemGUID); }; } else if(KnapSackWin.titleType == KnapsackFuncTitle.bag) else if (KnapSackWin.titleType == KnapsackFuncTitle.bag) { gridCell.itemCellBtn.OnOneParaClick=(int info) => { itemTipsModel.SetItemTipsModel(PackType.rptItem, itemModel.itemInfo.ItemGUID, false,true); gridCell.itemCellBtn.OnOneParaClick = (int info) => { itemTipsModel.SetItemTipsModel(PackType.rptItem, itemModel.itemInfo.ItemGUID, false, true); itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData); itemTipsModel.ShowUICtrl(); }; @@ -276,7 +294,7 @@ bool isLookEquip = false; if (playerPack.lookLineIndex > -1) { if(itemModel.itemInfo.ItemGUID == playerPack.lookItemGUID) if (itemModel.itemInfo.ItemGUID == playerPack.lookItemGUID) { gridCell.uiEffect.Play(); _lookEquipCell = gridCell; @@ -284,12 +302,12 @@ } } if(playerPack.isPlayBetterEquipEffect) if (playerPack.isPlayBetterEquipEffect) { if(modelInterface.GetBagSortBetterEquip(itemModel.chinItemModel.EquipPlace,itemModel.itemInfo.ItemPlace) != null) if (modelInterface.GetBagSortBetterEquip(itemModel.chinItemModel.EquipPlace, itemModel.itemInfo.ItemPlace) != null) { bool isOverdue = modelInterface.IsOverdue(itemModel.itemInfo.ItemGUID,itemModel.itemInfo.ItemID,itemModel.useDataDict); if(!isOverdue) bool isOverdue = modelInterface.IsOverdue(itemModel.itemInfo.ItemGUID, itemModel.itemInfo.ItemID, itemModel.useDataDict); if (!isOverdue) { gridCell.uiEffect.Play(); } @@ -301,7 +319,7 @@ } else { if(!isLookEquip) if (!isLookEquip) { gridCell.uiEffect.Stop(); } @@ -314,11 +332,12 @@ gridCell.SetModel(null); gridCell.uiEffect.Stop(); } gridCell.lockBtn.onClick.RemoveAllListeners(); gridCell.lockBtn.onClick.AddListener(() => { gridCell.lockBtn.onClick.AddListener(() => { int selectGridIndex = cell.index * 5 + int.Parse(gridCell.gameObject.name.Substring(gridCell.gameObject.name.Length - 1, 1)); OnClickLockBtn(selectGridIndex,packModel); OnClickLockBtn(selectGridIndex, packModel); }); } @@ -326,13 +345,15 @@ } public override void OnPackCanUseGrid(PackType type) { public override void OnPackCanUseGrid(PackType type) { if (type != PackType.rptItem) return; OnRefrenshUIModel(); } public override void OnAddItemCell(PackType type,int index,int id) { public override void OnAddItemCell(PackType type, int index, int id) { if (type != PackType.rptItem) return; System/KnapSack/New/KnapSackEventMgr.cs
@@ -78,7 +78,7 @@ } else if (WindowCenter.Instance.IsOpen<KingFairyChestWin>()) { WindowCenter.Instance.CloseImmediately<KingFairyChestWin>(); WindowCenter.Instance.Close<KingFairyChestWin>(); } } System/KnapSack/New/KnapSackWin.cs
@@ -12,7 +12,8 @@ using UnityEngine.Events; using UnityEngine.UI; namespace Snxxz.UI { namespace Snxxz.UI { public enum KnapsackFuncTitle { @@ -49,8 +50,7 @@ #endregion PlayerPackModel _playerPack; PlayerPackModel playerPack { PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } } PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } } @@ -86,10 +86,10 @@ base.OnActived(); this.transform.SetAsLastSibling(); _ornamentTitle.state = TitleBtnState.Locked; if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0 if (!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0 && playerPack.lookLineIndex == -1) { if(playerPack.redpointEquipDecom.state == RedPointState.Simple) if (playerPack.redpointEquipDecom.state == RedPointState.Simple) { functionOrder = _devourTitle.order; } @@ -99,7 +99,7 @@ protected override void OnAfterOpen() { } protected override void OnPreClose() @@ -124,23 +124,8 @@ { CloseSubWindows(); titleType = KnapsackFuncTitle.depot; if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<DepotWin>(); } else { WindowCenter.Instance.Open<DepotWin>(); } if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<BagWin>(); } else { WindowCenter.Instance.Open<BagWin>(true); } WindowCenter.Instance.Open<DepotWin>(); WindowCenter.Instance.Open<BagWin>(); playerPack.SetLookIndex(null); playerPack.isPlayBetterEquipEffect = false; functionOrder = _depotTitle.order; @@ -151,14 +136,7 @@ CloseSubWindows(); titleType = KnapsackFuncTitle.store; if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<BagStoreWin>(); } else { WindowCenter.Instance.Open<BagStoreWin>(); } WindowCenter.Instance.Open<BagStoreWin>(); playerPack.SetLookIndex(null); playerPack.isPlayBetterEquipEffect = false; @@ -171,7 +149,7 @@ playerPack.SetLookIndex(null); playerPack.isPlayBetterEquipEffect = false; functionOrder = _ornamentTitle.order; } private void OnClickBagTitle() @@ -179,26 +157,10 @@ CloseSubWindows(); titleType = KnapsackFuncTitle.bag; if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<BagWin>(); } else { WindowCenter.Instance.Open<BagWin>(true); } if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<RoleEquipWin>(); } else { WindowCenter.Instance.Open<RoleEquipWin>(); } WindowCenter.Instance.Open<BagWin>(); WindowCenter.Instance.Open<RoleEquipWin>(); functionOrder = _bagTitle.order; } private void OnClickDevourTitle() { @@ -207,14 +169,7 @@ CloseSubWindows(); titleType = KnapsackFuncTitle.devour; if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<EquipDevourWin>(); } else { WindowCenter.Instance.Open<EquipDevourWin>(); } WindowCenter.Instance.Open<EquipDevourWin>(); functionOrder = _devourTitle.order; } @@ -235,7 +190,7 @@ { WindowCenter.Instance.Close(window); } WindowCenter.Instance.CloseImmediately<BagWin>(); WindowCenter.Instance.CloseImmediately("BagWin"); } private void OnHidePanel() System/Launch/LaunchBackGroundWin.cs
@@ -54,14 +54,22 @@ { loginEffect.gameObject.SetActive(false); } this.transform.SetAsFirstSibling(); } protected override void OnAfterOpen() { StageLoad.Instance.onStageLoadFinish += ShowLoginEffect; if (StageLoad.Instance.currentStage is LoginStage) { ShowLoginEffect(); } } protected override void OnPreClose() { StageLoad.Instance.onStageLoadFinish -= ShowLoginEffect; Resources.UnloadAsset(m_SkeletonGraphic.material); } @@ -83,7 +91,7 @@ } #endregion public void ShowLoginEffect() void ShowLoginEffect() { if (!useStaticBackGround) { System/MainInterfacePanel/ChatFrame.cs
@@ -304,7 +304,7 @@ AutoImg.SetActive(true); if (WindowCenter.Instance.IsOpen<ExperienceOpenWin>()) { WindowCenter.Instance.CloseImmediately<ExperienceOpenWin>(); WindowCenter.Instance.Close<ExperienceOpenWin>(); } } @@ -315,7 +315,7 @@ //MainRedDot.Instance.redPointFriendChat.state = RedPointState.None; //ChatCtrl.Inst.presentChatType = ChatInfoType.Friend; //WindowCenter.Instance.Open<ChatWin>(); WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<SocialWin>(); } @@ -442,7 +442,7 @@ { if (WindowCenter.Instance.IsOpen<ExperienceOpenWin>()) { WindowCenter.Instance.CloseImmediately<ExperienceOpenWin>(); WindowCenter.Instance.Close<ExperienceOpenWin>(); } _hero.Behaviour.StopHandupAI(true); System/MainInterfacePanel/CoinTaskWin.cs
@@ -293,7 +293,7 @@ } _Text_TaskTarget.ExcuteHref(); TaskAllocation.Instance.TaskTime = TimeUtility.ServerNow; WindowCenter.Instance.CloseImmediately<TaskWin>(); WindowCenter.Instance.Close<TaskWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } System/MainInterfacePanel/DialogueDuidanceWin.cs
@@ -109,11 +109,11 @@ { if (WindowCenter.Instance.IsOpen<DungeonFightWin>()) { WindowCenter.Instance.CloseImmediately<DungeonFightWin>(); WindowCenter.Instance.Close<DungeonFightWin>(); } if (WindowCenter.Instance.IsOpen<DungeonMissionDetailsWin>()) { WindowCenter.Instance.CloseImmediately<DungeonMissionDetailsWin>(); WindowCenter.Instance.Close<DungeonMissionDetailsWin>(); } } System/MainInterfacePanel/EffectToFaBaoWin.cs
@@ -106,7 +106,7 @@ private void OnComplet() { WindowCenter.Instance.CloseImmediately<EffectToFaBaoWin>(); WindowCenter.Instance.Close<EffectToFaBaoWin>(); if (EffectToFaBaoEvent != null) { EffectToFaBaoEvent(); System/MainInterfacePanel/FeatureNoticeModel.cs
@@ -182,7 +182,7 @@ var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>(); var IsLoading = StageLoad.Instance.isLoading; if (NewBieCenter.Instance.inGuiding || treasureModel.newGotShowing || inDungeon || !IsOpenMaininterface || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() || || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() || IsOpenOffLineOnHook || IsLoading) { yield break; System/MainInterfacePanel/FlyingShoesTask.cs
@@ -618,7 +618,7 @@ int FairyNumber = TaskAllocation.Instance.FairyAuNumber(); if (FairyNumber == 10 && !WindowCenter.Instance.IsOpen<FairyWearWin>()) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<FairyAuTaskWin>(); } } System/MainInterfacePanel/InformationTipsWin.cs
@@ -80,7 +80,7 @@ taskmodel.RequestGetTaskAward("Double"); Close(); SelectionManager.Release(SelectionManager.E_Type.Green); WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>(); WindowCenter.Instance.Close<TaskBoxBGMWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } System/MainInterfacePanel/LowSettingTip.cs
@@ -158,7 +158,7 @@ void RankingListButton()//排行榜 { WindowCenter.Instance.Open<RankPanel>(); WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); } System/MainInterfacePanel/MainInterfaceWin.cs
@@ -434,7 +434,7 @@ GlobalTimeEvent.Instance.secondEvent -= secondEvent; if (WindowCenter.Instance.IsOpen<FunctionForecastWin>()) { WindowCenter.Instance.CloseImmediately<FunctionForecastWin>(); WindowCenter.Instance.Close<FunctionForecastWin>(); } GA_NpcCollect.OnArrive -= OnArriveCollectNPC; GA_NpcCollect.OnLeave -= OnLeaveCollectNpc; @@ -662,58 +662,11 @@ onMainModel.MoveBool = false; if (WindowCenter.Instance.IsOpen("PathfindingIconWin")) { WindowCenter.Instance.CloseImmediately<PathfindingIconWin>(); } } if (runeTowerModel.newPassFloor > 0 && !IsDungeon()) { if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin")) { if (!WindowCenter.Instance.IsOpen("RuneNewGotWin")) { WindowCenter.Instance.Open<RuneNewGotWin>(); } } } if (jadeDynastyTowerModel.specialUnLockFloor > 0 && !IsDungeon()) { if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin")) { if (!WindowCenter.Instance.IsOpen("JadeDynastyTowerUnLockWin")) { WindowCenter.Instance.Open<JadeDynastyTowerUnLockWin>(); } } } if (jadeDynastyTowerModel.openJadeDynastyTower && !IsDungeon()) { if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin")) { if (!WindowCenter.Instance.IsOpen("TowerWin")) { WindowCenter.Instance.Open<TowerWin>(false, 1); jadeDynastyTowerModel.openJadeDynastyTower = false; } } } if (iceCrystalVeinModel.IsIceCrystalVeinCopy && !IsDungeon())//是否再次打开冰晶矿脉面板 { if (!WindowCenter.Instance.IsOpen("NewBieWin") && !WindowCenter.Instance.IsOpen("TreasureNewGotWin")) { if (!WindowCenter.Instance.IsOpen("IceCrystalVeinWin")) { WindowCenter.Instance.Open<IceCrystalVeinWin>(); } iceCrystalVeinModel.IsIceCrystalVeinCopy = false; WindowCenter.Instance.Close<PathfindingIconWin>(); } } } public void FriendQuestBtn() { @@ -748,21 +701,21 @@ { if (festivalRedpackModel.systemRedpoint.state == RedPointState.GetReward) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); festivalRedpackModel.jumpType = 1; festivalRedpackModel.autoOpen = true; WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19); } else if (festivalRedpackModel.receiveRedpoint.state == RedPointState.GetReward) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); festivalRedpackModel.jumpType = 3; festivalRedpackModel.autoOpen = true; WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19); } else if (OSEnvelopeModel.m_OpenServerGetRedpin.state == RedPointState.GetReward) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 2; ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().autoOpen = true; WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2); @@ -778,13 +731,13 @@ { if (festivalRedpackModel.taskRedpoint.state == RedPointState.Simple) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); festivalRedpackModel.jumpType = 2; WindowCenter.Instance.Open<OpenServerActivityWin>(false, 19); } else if (OSEnvelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); ModelCenter.Instance.GetModel<OSRedEnvelopeModel>().JumpType = 1; WindowCenter.Instance.Open<OpenServerActivityWin>(false, 2); } @@ -1405,7 +1358,7 @@ m_InGamePusher.gameObject.SetActive(true); if (WindowCenter.Instance.IsOpen<FightingPKWin>()) { WindowCenter.Instance.CloseImmediately<FightingPKWin>(); WindowCenter.Instance.Close<FightingPKWin>(); } OnRedBagGet(); } System/MainInterfacePanel/PlayerMainDate.cs
@@ -402,7 +402,7 @@ { if (WindowCenter.Instance.IsOpen<PowerAddWin>()) { WindowCenter.Instance.CloseImmediately<PowerAddWin>(); WindowCenter.Instance.Close<PowerAddWin>(); } WindowCenter.Instance.Open<PowerAddWin>(); } @@ -431,7 +431,7 @@ StrengthegingAddFight = 0; if (WindowCenter.Instance.IsOpen<PowerAddWin>()) { WindowCenter.Instance.CloseImmediately<PowerAddWin>(); WindowCenter.Instance.Close<PowerAddWin>(); } WindowCenter.Instance.Open<PowerAddWin>(); } @@ -441,7 +441,7 @@ ProwNumAdd = power; if (WindowCenter.Instance.IsOpen<PowerAddWin>()) { WindowCenter.Instance.CloseImmediately<PowerAddWin>(); WindowCenter.Instance.Close<PowerAddWin>(); } if (prowNum != 0) System/MainInterfacePanel/PlayerTaskDatas.cs
@@ -358,7 +358,7 @@ if (NPCid == config.NpcID[i]) { if (!WindowCenter.Instance.IsOpen<DialogueDuidanceWin>() && IsOpenMain && !treasureStageUpShow && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) && !treasureStageUpShow && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<DialogueDuidanceWin>(); System/MainInterfacePanel/SideMission.cs
@@ -87,7 +87,7 @@ _Text_TaskTarget.ExcuteHref(); } WindowCenter.Instance.CloseImmediately<TaskWin>(); WindowCenter.Instance.Close<TaskWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } void OnCreateGridLineCell(ScrollerController gridCtrl)//任务预制体创建 System/MainInterfacePanel/StoryTask.cs
@@ -198,7 +198,7 @@ return; } _Text_TaskTarget.ExcuteHref(); WindowCenter.Instance.CloseImmediately<TaskWin>(); WindowCenter.Instance.Close<TaskWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } System/MainInterfacePanel/TaskBoxBGMWin.cs
@@ -148,7 +148,7 @@ if (!ModelCenter.Instance.GetModel<TeamModel>().teamPrepare.isPreparing) { taskmodel.RequestGetTaskAward("OK"); WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>(); WindowCenter.Instance.Close<TaskBoxBGMWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } @@ -177,7 +177,7 @@ IEnumerator LateRelease() { yield return WaitingForSecondConst.WaitMS500; WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>(); WindowCenter.Instance.Close<TaskBoxBGMWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); yield break; } System/MainInterfacePanel/TaskWin.cs
@@ -136,7 +136,7 @@ { _CoinTaskWin.SetActive(false); _StoryTaskWin.SetActive(false); WindowCenter.Instance.CloseImmediately<TaskWin>(); WindowCenter.Instance.Close<TaskWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } System/MainInterfacePanel/TipPanel.cs
@@ -62,7 +62,7 @@ { yield return null; if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !NewBieCenter.Instance.inGuiding && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading && !treasureModel.newGotShowing) { IsOPenTip(); @@ -73,7 +73,7 @@ { yield return WaitingForSecondConst.WaitMS500; if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !NewBieCenter.Instance.inGuiding && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() && !StageLoad.Instance.isLoading && StageLoad.Instance.currentStage is DungeonStage && !treasureModel.newGotShowing) { IsOPenTip(); System/Message/MessageWin.cs
@@ -18,11 +18,13 @@ { if (_inst == null) { _inst = WindowCenter.Instance.Open<MessageWin>(true); _inst = WindowCenter.Instance.Get<MessageWin>(); } return _inst; } } [SerializeField] RectTransform m_ContianerFixedTip0; [SerializeField] RichText m_FixedTip0; @@ -101,6 +103,10 @@ if (_hint != null) { serverTipPrepared = false; if (!m_ServerTipScaleTween.gameObject.activeSelf) { m_ServerTipScaleTween.gameObject.SetActive(true); } m_ServerTipScaleTween.SetStartState(); m_ServerTipPositionTween.SetStartState(); m_ContainerServerTip.gameObject.SetActive(true); System/NetLink/NetLinkWin.cs
@@ -20,18 +20,12 @@ { linkOverTime = _delay; if (!WindowCenter.Instance.IsOpen<NetLinkWin>()) { WindowCenter.Instance.Open<NetLinkWin>(true); } WindowCenter.Instance.Open<NetLinkWin>(true); } public static void Hide() { if (WindowCenter.Instance.IsOpen<NetLinkWin>()) { WindowCenter.Instance.Close<NetLinkWin>(); } WindowCenter.Instance.Close<NetLinkWin>(); } System/NewBieGuidance/NewBieCenter.cs
@@ -174,7 +174,7 @@ } WindowCenter.Instance.Open<NewBieWin>(true); WindowCenter.Instance.CloseImmediately<ChatWin>(); WindowCenter.Instance.Close<ChatWin>(); WindowJumpMgr.Instance.ClearJumpData(); @@ -198,7 +198,7 @@ { var guideRecord = currentGuide; currentGuide = 0; WindowCenter.Instance.CloseImmediately<NewBieWin>(); WindowCenter.Instance.Close<NewBieWin>(); if (!completeGuidesBuf.Contains(guideRecord)) { @@ -387,7 +387,7 @@ GameNetSystem.Instance.SendInfo(send); currentGuide = 0; WindowCenter.Instance.CloseImmediately<NewBieWin>(); WindowCenter.Instance.Close<NewBieWin>(); var allGuideKeys = Config.Instance.GetAllKeys<GuideConfig>(); for (int i = 0; i < allGuideKeys.Count; i++) @@ -405,7 +405,7 @@ GameNetSystem.Instance.SendInfo(send); currentGuide = 0; WindowCenter.Instance.CloseImmediately<NewBieWin>(); WindowCenter.Instance.Close<NewBieWin>(); completeGuidesBuf.Clear(); } System/NewBieGuidance/NewBieWin.cs
@@ -224,7 +224,7 @@ yield return null; } WindowCenter.Instance.CloseImmediately<ChatWin>(); WindowCenter.Instance.Close<ChatWin>(); m_RaycasterMask.gameObject.SetActive(false); m_NewBieGuide.gameObject.SetActive(true); System/NewYearFairylandCeremony/NewYearFairylandCeremonyWin.cs
@@ -40,13 +40,13 @@ protected override void OnActived() { base.OnActived(); if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) if (!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0) { if(ceremonyModel.rechargeRedp.state == RedPointState.Simple) if (ceremonyModel.rechargeRedp.state == RedPointState.Simple) { functionOrder = rechargeFunc.order; } else if(ceremonyModel.peopleRedp.state == RedPointState.Simple) else if (ceremonyModel.peopleRedp.state == RedPointState.Simple) { functionOrder = peopleToHiFunc.order; } @@ -56,17 +56,17 @@ protected override void OnAfterOpen() { } protected override void OnPreClose() { } protected override void OnAfterClose() { if(!WindowJumpMgr.Instance.IsJumpState) if (!WindowJumpMgr.Instance.IsJumpState) { WindowCenter.Instance.Open<MainInterfaceWin>(); } @@ -85,56 +85,28 @@ private void ClickOutOf() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyOutOfPrintWin>(); } else { WindowCenter.Instance.Open<NewYearCeremonyOutOfPrintWin>(); } WindowCenter.Instance.Open<NewYearCeremonyOutOfPrintWin>(); functionOrder = 3; } private void ClickPeopleToHi() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyPeopleToHiWin>(); } else { WindowCenter.Instance.Open<NewYearCeremonyPeopleToHiWin>(); } WindowCenter.Instance.Open<NewYearCeremonyPeopleToHiWin>(); functionOrder = 2; } private void ClickFire() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyFirepartyWin>(); } else { WindowCenter.Instance.Open<NewYearCeremonyFirepartyWin>(); } WindowCenter.Instance.Open<NewYearCeremonyFirepartyWin>(); functionOrder = 1; } private void ClickRecharge() { CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyRechargeGiftWin>(); } else { WindowCenter.Instance.Open<NewYearCeremonyRechargeGiftWin>(); } WindowCenter.Instance.Open<NewYearCeremonyRechargeGiftWin>(); functionOrder = 0; } System/OpenServerActivity/AchievementActivityWin.cs
@@ -70,7 +70,7 @@ private void operationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.SpringFestival || arg1== Operation.OpenServiceAchievement) if (arg1 == Operation.SpringFestival || arg1 == Operation.OpenServiceAchievement) { IsButtonNumber(); } @@ -107,38 +107,24 @@ { if (WindowCenter.Instance.IsOpen<OpenServiceAchievementWin>()) { WindowCenter.Instance.CloseImmediately<OpenServiceAchievementWin>(); WindowCenter.Instance.Close<OpenServiceAchievementWin>(); } if (WindowCenter.Instance.IsOpen<SpringFestivalWin>()) { WindowCenter.Instance.CloseImmediately<SpringFestivalWin>(); WindowCenter.Instance.Close<SpringFestivalWin>(); } } private void OpenServiceAchievementButton() { CloseChild(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<OpenServiceAchievementWin>(); } else { WindowCenter.Instance.Open<OpenServiceAchievementWin>(true); } WindowCenter.Instance.Open<OpenServiceAchievementWin>(true); functionOrder = 0; } private void SpringFestivalButton() { CloseChild(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<SpringFestivalWin>(); } else { WindowCenter.Instance.Open<SpringFestivalWin>(true); } WindowCenter.Instance.Open<SpringFestivalWin>(true); functionOrder = 1; } #endregion System/OpenServerActivity/FestivalAchievementCell.cs
@@ -69,7 +69,7 @@ } if (!_isReach) { m_AchiveGoto.onClick.AddListener(() => m_AchiveGoto.onClick.AddListener((UnityEngine.Events.UnityAction)(() => { if (!model.IsOpen) { @@ -77,8 +77,8 @@ return; } achieveModel.GotoCompleteAchievement(achievementId); WindowCenter.Instance.CloseImmediately<OpenServerActivityWin>(); }); WindowCenter.Instance.Close<OpenServerActivityWin>(); })); } } } System/OpenServerActivity/MysticalPurchaseWin.cs
@@ -108,14 +108,14 @@ if(purchaseModel.isOpenPrompting) { ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("MysticalPurchase103"), Language.Get("ConfirmCancel102"), (bool isOk, bool isToggle) => Language.Get("ConfirmCancel102"), (Action<bool, bool>)((bool isOk, bool isToggle) => { if (isOk) { WindowCenter.Instance.CloseImmediately<OpenServerActivityWin>(); WindowCenter.Instance.Close<OpenServerActivityWin>(); } purchaseModel.isOpenPrompting = !isToggle; }); })); return false; } return true; System/OpenServerActivity/OSAchieveCell.cs
@@ -69,7 +69,7 @@ } if (!_isReach) { m_AchiveGoto.onClick.AddListener(() => m_AchiveGoto.onClick.AddListener((UnityEngine.Events.UnityAction)(() => { if (TimeUtility.OpenDay >= model.openDays) { @@ -77,8 +77,8 @@ return; } achieveModel.GotoCompleteAchievement(_currentAchieve); WindowCenter.Instance.CloseImmediately<OpenServerActivityWin>(); }); WindowCenter.Instance.Close<OpenServerActivityWin>(); })); } } } System/Pet/PetAttributeMethods.cs
@@ -615,6 +615,7 @@ CreateCurPetSkill(); curPetNameText.text = petInfoConfig.Name; AllPetAttrCtrl(); if (WindowCenter.Instance.Get<PetAttributeWin>().AchievementGuideEffect2 != null) { AchievementGuideEffectPool.Recycle(WindowCenter.Instance.Get<PetAttributeWin>().AchievementGuideEffect2); System/Pet/PetWin.cs
@@ -26,7 +26,7 @@ void CloseBtn() { CloseChild(); WindowCenter.Instance.CloseImmediately<PetWin>(); WindowCenter.Instance.Close<PetWin>(); } protected override void BindController() @@ -95,43 +95,22 @@ private void OnClickPetPanel() { CloseChild(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<MountWin>(); } else { WindowCenter.Instance.Open<MountWin>(true); } WindowCenter.Instance.Open<MountWin>(true); functionOrder = 1; } private void OnClickEvolveTrainWin() { CloseChild(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<PetAttributeWin>(); } else { WindowCenter.Instance.Open<PetAttributeWin>(true); } WindowCenter.Instance.Open<PetAttributeWin>(true); functionOrder = 0; } void CloseChild() { if (WindowCenter.Instance.IsOpen<PetAttributeWin>()) { WindowCenter.Instance.CloseImmediately<PetAttributeWin>(); } if (WindowCenter.Instance.IsOpen<MountWin>()) { WindowCenter.Instance.CloseImmediately<MountWin>(); } WindowCenter.Instance.Close<PetAttributeWin>(); WindowCenter.Instance.Close<MountWin>(); } } } System/PlayerDead/PlayerDeadModel.cs
@@ -289,10 +289,10 @@ TimeDownMgr.Instance.Stop(TimeDownMgr.CoolTimeType.DeadCD); TimeDownMgr.Instance.Stop(TimeDownMgr.CoolTimeType.BossAutoReborn); TimeDownMgr.Instance.Stop(TimeDownMgr.CoolTimeType.DuplicatesReborn); WindowCenter.Instance.CloseImmediately<RebornWin>(); WindowCenter.Instance.CloseImmediately<ReliveWin>(); WindowCenter.Instance.CloseImmediately<RebornTiredWin>(); WindowCenter.Instance.CloseImmediately<ElderGodAreaRebornWin>(); WindowCenter.Instance.Close<RebornWin>(); WindowCenter.Instance.Close<ReliveWin>(); WindowCenter.Instance.Close<RebornTiredWin>(); WindowCenter.Instance.Close<ElderGodAreaRebornWin>(); if (CloseRebornWinEvent != null) { System/Realm/RealmBossShow.cs
@@ -67,7 +67,7 @@ IEnumerator Co_Start() { yield return WaitingForSecondConst.WaitMS500; WindowCenter.Instance.CloseImmediately<RealmBossShowWin>(); WindowCenter.Instance.Close<RealmBossShowWin>(); StartBossShow(); } @@ -176,7 +176,7 @@ StageLoad.Instance.onStartStageLoadingEvent -= OnStartStageLoadingEvent; CameraController.Instance.CameraObject.gameObject.SetActive(true); WindowCenter.Instance.uiRoot.uicamera.enabled = true; WindowCenter.Instance.CloseImmediately<RealmBossShowWin>(); WindowCenter.Instance.Close<RealmBossShowWin>(); showCamera.enabled = false; m_Effect.gameObject.SetActive(false); transform.localPosition = new Vector3(0, 4000, 5000); System/Role/MagicianModel.cs
@@ -481,11 +481,11 @@ { if (WindowCenter.Instance.IsOpen<GodWeaponPreviewWin>()) { WindowCenter.Instance.CloseImmediately<GodWeaponPreviewWin>(); WindowCenter.Instance.Close<GodWeaponPreviewWin>(); } if (WindowCenter.Instance.IsOpen<HowToPlayWin>()) { WindowCenter.Instance.CloseImmediately<HowToPlayWin>(); WindowCenter.Instance.Close<HowToPlayWin>(); } ActivateShow.GodWeaponStage(_type, _nowLv, _beforeLv, stage); } @@ -501,11 +501,11 @@ { if (WindowCenter.Instance.IsOpen<GodWeaponPreviewWin>()) { WindowCenter.Instance.CloseImmediately<GodWeaponPreviewWin>(); WindowCenter.Instance.Close<GodWeaponPreviewWin>(); } if (WindowCenter.Instance.IsOpen<HowToPlayWin>()) { WindowCenter.Instance.CloseImmediately<HowToPlayWin>(); WindowCenter.Instance.Close<HowToPlayWin>(); } ActivateShow.GodWeaponActivate(_type, _nowLv, _beforeLv); } System/Role/RoleModel.cs
@@ -63,7 +63,7 @@ SysNotifyMgr.Instance.ShowTip("RenameSuccess01", playerRename); if(WindowCenter.Instance.IsOpen<RoleRenameWin>()) { WindowCenter.Instance.CloseImmediately<RoleRenameWin>(); WindowCenter.Instance.Close<RoleRenameWin>(); } GameNetSystem.Instance.Reconnect(); break; System/Rune/RunePackCell.cs
@@ -118,20 +118,20 @@ { var otherSameHole = sameHoles[0] == model.sltRuneHole ? sameHoles[1] : sameHoles[0]; var otherRune = model.GetHoleRune(otherSameHole); ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("SwitchDoublePropertyRune"), (bool isOk) => ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("SwitchDoublePropertyRune"), (Action<bool>)((bool isOk) => { if (isOk) { SwitchRune(otherRune.packtype, otherSameHole, _rune.packtype, 0); SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole); WindowCenter.Instance.CloseImmediately<RunePackWin>(); WindowCenter.Instance.Close<RunePackWin>(); } }); })); } else { SwitchRune(_rune.packtype, _rune.index, (int)PackType.rptInterimPack, model.sltRuneHole); WindowCenter.Instance.CloseImmediately<RunePackWin>(); WindowCenter.Instance.Close<RunePackWin>(); } } System/RuneTower/RuneTowerModel.cs
@@ -358,6 +358,7 @@ if (config.UnLockRune > 0) { newPassFloor = (int)runeModel.RuneTowerOpenLV; PopupWindowsProcessor.Instance.Add("RuneNewGotWin"); } if (!allTowerCompleted && config.TowerId != currentTower) System/Sound/SoundPlayer.cs
@@ -222,7 +222,7 @@ if (clip != null) { _source.volume = SystemSetting.Instance.GetSoundEffect() * (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() ? GeneralDefine.audioScaleWhenFullScreenOn : 1f); (WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() ? GeneralDefine.audioScaleWhenFullScreenOn : 1f); _source.PlayOneShot(clip); } System/Store/StoreModel.cs
@@ -1709,7 +1709,7 @@ if(isClearData) { ClearPushData(); WindowCenter.Instance.CloseImmediately<PetAndMountPushWin>(); WindowCenter.Instance.Close<PetAndMountPushWin>(); return; } @@ -1722,7 +1722,7 @@ } else { WindowCenter.Instance.CloseImmediately<PetAndMountPushWin>(); WindowCenter.Instance.Close<PetAndMountPushWin>(); } } System/Strengthening/GemFlauntCell.cs
@@ -35,9 +35,9 @@ private void GemFlaunt() { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<EquipReinforceWin>(); WindowCenter.Instance.CloseImmediately<JadeDynastySelectGemWin>(); WindowCenter.Instance.CloseImmediately<JadeDynastyKnapSackWin>(); WindowCenter.Instance.Close<EquipReinforceWin>(); WindowCenter.Instance.Close<JadeDynastySelectGemWin>(); WindowCenter.Instance.Close<JadeDynastyKnapSackWin>(); ChatCtrl.Inst.presentChatType = ChatInfoType.World; ChatCtrl.Inst.openFromGem = true; ChatCtrl.Inst.flauntGemId = itemId; System/SystemSetting/SystemSetWin.cs
@@ -278,7 +278,7 @@ } } WindowCenter.Instance.CloseImmediately<SettingUpWin>(); WindowCenter.Instance.Close<SettingUpWin>(); if (!WindowCenter.Instance.IsOpen<LockedScreenWin>()) { System/TaiChi/TaiChiModel.cs
@@ -82,8 +82,8 @@ var state = dailyQuestModel.GetQuestState(TaiChiDailyTaskID); if (state == DailyQuestModel.DailyQuestState.Normal) return; WindowCenter.Instance.CloseImmediately<WytjGameWin>(); WindowCenter.Instance.CloseImmediately<WytjRulesWin>(); WindowCenter.Instance.Close<WytjGameWin>(); WindowCenter.Instance.Close<WytjRulesWin>(); } public string taiChiResultNum { get; private set; } System/Team/TeamFrameWin.cs
@@ -49,12 +49,12 @@ if (WindowCenter.Instance.IsOpen<MyTeamWin>()) { WindowCenter.Instance.CloseImmediately<MyTeamWin>(); WindowCenter.Instance.Close<MyTeamWin>(); } if (WindowCenter.Instance.IsOpen<TeamListWin>()) { WindowCenter.Instance.CloseImmediately<TeamListWin>(); WindowCenter.Instance.Close<TeamListWin>(); } } @@ -94,7 +94,7 @@ { if (WindowCenter.Instance.IsOpen<MyTeamWin>()) { WindowCenter.Instance.CloseImmediately<MyTeamWin>(); WindowCenter.Instance.Close<MyTeamWin>(); } WindowCenter.Instance.Open<TeamListWin>(true); @@ -105,7 +105,7 @@ { if (WindowCenter.Instance.IsOpen<TeamListWin>()) { WindowCenter.Instance.CloseImmediately<TeamListWin>(); WindowCenter.Instance.Close<TeamListWin>(); } WindowCenter.Instance.Open<MyTeamWin>(true); System/Tip/ExperienceGetWin.cs
@@ -24,13 +24,50 @@ static void OnGetNewExperience(int _source, int _billionsExperience, int _unitExperience) { if (!WindowCenter.Instance.IsOpen<ExperienceGetWin>()) if (!WindowCenter.Instance.IsOpen("ExperienceGetWin")) { WindowCenter.Instance.Open<ExperienceGetWin>(true); } ExperienceGetWin win = WindowCenter.Instance.Get<ExperienceGetWin>(); win.OnGetNewExperience(_source, _billionsExperience * (long)100000000 + _unitExperience); var experience = _billionsExperience * (long)100000000 + _unitExperience; if (experienceQueue.Count >= queueMax) { experienceQueue.Dequeue(); } experienceQueue.Enqueue(new Experience() { source = _source, value = experience }); } public static bool GetExperience(out Experience exp) { if (experienceQueue.Count > 0) { exp = experienceQueue.Dequeue(); return true; } else { exp = default(Experience); return false; } } public static void Clear() { experienceQueue.Clear(); } static int queueMax = 10; static Queue<Experience> experienceQueue = new Queue<Experience>(); public struct Experience { public int source; public long value; } } @@ -45,9 +82,6 @@ float interval = 0.2f; float nextShowTime = 0f; int queueMax = 10; Queue<Experience> experienceQueue = new Queue<Experience>(); #region Built-in protected override void BindController() @@ -68,7 +102,7 @@ protected override void OnPreClose() { experienceQueue.Clear(); ExperienceGetBehaviour.Clear(); ExperienceFloatPool.RecycleAll(); } @@ -78,46 +112,26 @@ } #endregion public void OnGetNewExperience(int _source, long _experience) { if (experienceQueue.Count >= queueMax) { experienceQueue.Dequeue(); } experienceQueue.Enqueue(new Experience() { source = _source, value = _experience }); } protected override void LateUpdate() { base.LateUpdate(); if (Time.time > nextShowTime) { if (experienceQueue.Count > 0) ExperienceGetBehaviour.Experience exp; if (ExperienceGetBehaviour.GetExperience(out exp)) { var exp = experienceQueue.Dequeue(); var experienceFloat = ExperienceFloatPool.Require(exp.source == 4 ? ExperienceFloat.Pattern.LongFeng : ExperienceFloat.Pattern.Normal); experienceFloat.gameObject.SetActive(true); experienceFloat.transform.SetParentEx(m_ResetPoint, Vector3.zero, Quaternion.identity, Vector3.one); experienceFloat.Begin(exp.source, exp.value); nextShowTime = Time.time + interval; } } } public struct Experience { public int source; public long value; } } } System/Tip/SpGetWin.cs
@@ -11,6 +11,8 @@ public class SpGetBehaviour { static int queueMax = 10; static Queue<long> spQueue = new Queue<long>(); public static void Init() { @@ -24,15 +26,36 @@ static void OnGetNewSp(long _sp) { if (!WindowCenter.Instance.IsOpen<SpGetWin>()) if (!WindowCenter.Instance.IsOpen("SpGetWin")) { WindowCenter.Instance.Open<SpGetWin>(true); } var win = WindowCenter.Instance.Get<SpGetWin>(); win.OnGetNewSp(_sp); if (spQueue.Count >= queueMax) { spQueue.Dequeue(); } spQueue.Enqueue(_sp); } public static long GetSp() { if (spQueue.Count > 0) { return spQueue.Dequeue(); } else { return 0; } } public static void Clear() { spQueue.Clear(); } } namespace Snxxz.UI @@ -40,15 +63,10 @@ public class SpGetWin : Window { [SerializeField] Transform m_ResetPoint; [SerializeField] Transform m_ResetPoint; float interval = 0.2f; float nextShowTime = 0f; int queueMax = 10; Queue<long> spQueue = new Queue<long>(); #region Built-in protected override void BindController() @@ -69,7 +87,7 @@ protected override void OnPreClose() { spQueue.Clear(); SpGetBehaviour.Clear(); SpFloatPool.RecycleAll(); } @@ -79,25 +97,15 @@ } #endregion public void OnGetNewSp(long _sp) { if (spQueue.Count >= queueMax) { spQueue.Dequeue(); } spQueue.Enqueue(_sp); } protected override void LateUpdate() { base.LateUpdate(); if (Time.time > nextShowTime) { if (spQueue.Count > 0) var sp = SpGetBehaviour.GetSp(); if (sp > 0) { var sp = spQueue.Dequeue(); var spFloat = SpFloatPool.Require(); spFloat.gameObject.SetActive(true); spFloat.transform.SetParentEx(m_ResetPoint, Vector3.zero, Quaternion.identity, Vector3.one); System/Treasure/FairyTreasureCollectPanelPattern3.cs
@@ -130,7 +130,7 @@ FuncOpen.Instance.ProcessorFuncErrorTip(124); return; } WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<TreasureFindHostWin>(); break; } @@ -145,7 +145,7 @@ } if (show) { WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } show = false; System/Treasure/FairyTreasureCollectPanelPattern5.cs
@@ -253,22 +253,22 @@ private void BeginFly() { CameraUtility.ScreenShotCut((Texture2D _tex) => CameraUtility.ScreenShotCut((Action<Texture2D>)((Texture2D _tex) => { TreasureStageUpTriggerWin.screenShotCut = _tex; WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<TreasureStageUpTriggerWin>(true); WindowCenter.Instance.Open<MainInterfaceWin>(); if (WindowCenter.Instance.IsOpen<DialogueDuidanceWin>()) { WindowCenter.Instance.CloseImmediately<DialogueDuidanceWin>(); WindowCenter.Instance.Close<DialogueDuidanceWin>(); } if (WindowCenter.Instance.IsOpen<TaskBoxBGMWin>()) { WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>(); WindowCenter.Instance.Close<TaskBoxBGMWin>(); } }); })); } private void Display() @@ -439,7 +439,7 @@ private void GotoStove() { WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<BlastFurnaceWin>(); } System/Treasure/TreasureBaseWin.cs
@@ -130,7 +130,7 @@ { if (WindowCenter.Instance.IsOpen<EffectToFaBaoWin>()) { WindowCenter.Instance.CloseImmediately<EffectToFaBaoWin>(); WindowCenter.Instance.Close<EffectToFaBaoWin>(); } CloseSubWindows(); m_DisplayContainer.gameObject.SetActive(true); System/Treasure/TreasureLevelUpWin.cs
@@ -669,7 +669,7 @@ { if (mainTaskId != 0) { WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); task.AutomaticTripToTask(mainTaskId); } @@ -771,7 +771,7 @@ if (WindowCenter.Instance.IsOpen<TreasureStageTipWin>()) { WindowCenter.Instance.CloseImmediately<TreasureStageTipWin>(); WindowCenter.Instance.Close<TreasureStageTipWin>(); } switch (stage.unlockType) @@ -794,7 +794,7 @@ break; case TreasureStageUnlock.Treasure: WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); break; case TreasureStageUnlock.TreasureSoul: @@ -814,23 +814,23 @@ private void StartScreenShot() { CameraUtility.ScreenShotCut((Texture2D _tex) => CameraUtility.ScreenShotCut((Action<Texture2D>)((Texture2D _tex) => { TreasureStageUpTriggerWin.screenShotCut = _tex; WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<TreasureBaseWin>(); WindowCenter.Instance.Close<TreasureBaseWin>(); WindowCenter.Instance.Open<TreasureStageUpTriggerWin>(true); WindowCenter.Instance.Open<MainInterfaceWin>(); if (WindowCenter.Instance.IsOpen<DialogueDuidanceWin>()) { WindowCenter.Instance.CloseImmediately<DialogueDuidanceWin>(); WindowCenter.Instance.Close<DialogueDuidanceWin>(); } if (WindowCenter.Instance.IsOpen<TaskBoxBGMWin>()) { WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>(); WindowCenter.Instance.Close<TaskBoxBGMWin>(); } m_ContainerSkillShow.gameObject.SetActive(false); }); })); } private void PlaySkillShow() System/Treasure/TreasureModel.cs
@@ -303,7 +303,7 @@ { if (serverInited) { if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { if (!WindowCenter.Instance.IsOpen<TreasureRegulusPopWin>()) { @@ -1110,7 +1110,7 @@ } if (!PreFightMission.Instance.IsFinished() || newGotTreasureId == 0 || NewBieCenter.Instance.inGuiding || !WindowCenter.Instance.IsOpen<MainInterfaceWin>() || WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual(WindowType.Base) || WindowCenter.Instance.ExistAnyFullScreenOrMaskWinLEqual(WindowType.Base) || WindowCenter.Instance.IsOpen<TreasureNewGotWin>()) { return; System/Vip/FirstTimeRechargeModel.cs
@@ -55,7 +55,7 @@ { if (WindowCenter.Instance.IsOpen("FirstTimeRechargeWin")) { WindowCenter.Instance.CloseImmediately<FirstTimeRechargeWin>(); WindowCenter.Instance.Close<FirstTimeRechargeWin>(); } } } @@ -150,7 +150,7 @@ private void windowBeforeOpenEvent(Window obj) { if ((!WindowCenter.Instance.IsOpen<MainInterfaceWin>() && WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) || obj is ChatWin) if ((!WindowCenter.Instance.IsOpen<MainInterfaceWin>() && WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) || obj is ChatWin) { if (WindowCenter.Instance.IsOpen("FirstTimeRechargeWin")) { @@ -204,7 +204,7 @@ int second = (int)ts.TotalSeconds; if (CumulativeTime != 0 && PlayerDatas.Instance.baseData.LV <= FirstGoldTimeOut && PlayerDatas.Instance.baseData.coinPointTotal <= 0 && second > 0 /*&& !inDungeon*/ && CumulativeTime - second > 0) { if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()&& !WindowCenter.Instance.IsOpen<ChatWin>()) if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()&& !WindowCenter.Instance.IsOpen<ChatWin>()) { if (!WindowCenter.Instance.IsOpen("FirstTimeRechargeWin")) { System/Vip/FirstTimeRechargeWin.cs
@@ -183,12 +183,12 @@ m_RewardInformationImage.SetActive(false); if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !NewBieCenter.Instance.inGuiding) { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); } UI3DModelExhibition.Instance.StopShow(); if (WindowCenter.Instance.IsOpen<FirstTimeRechargeWin>()) { WindowCenter.Instance.CloseImmediately<FirstTimeRechargeWin>(); WindowCenter.Instance.Close<FirstTimeRechargeWin>(); } if (!NewBieCenter.Instance.inGuiding) { System/Vip/VipExperienceWin.cs
@@ -68,7 +68,7 @@ { if (WindowCenter.Instance.IsOpen<VipExperienceWin>()) { WindowCenter.Instance.CloseImmediately<VipExperienceWin>(); WindowCenter.Instance.Close<VipExperienceWin>(); } } } System/Vip/VipModel.cs
@@ -76,7 +76,7 @@ m_VipExperienceTime = 0; if (WindowCenter.Instance.IsOpen<GotoChargeWin>()) { WindowCenter.Instance.CloseImmediately<GotoChargeWin>(); WindowCenter.Instance.Close<GotoChargeWin>(); } m_RechargeCountDict.Clear(); m_ChargeReset = true; @@ -149,15 +149,15 @@ m_ChargeReset = true; if (WindowCenter.Instance.IsOpen<RechargeBoxWin>()) { WindowCenter.Instance.CloseImmediately<RechargeBoxWin>(); WindowCenter.Instance.Close<RechargeBoxWin>(); } if (WindowCenter.Instance.IsOpen<SupremeRechargeWin>()) { WindowCenter.Instance.CloseImmediately<SupremeRechargeWin>(); WindowCenter.Instance.Close<SupremeRechargeWin>(); } if (WindowCenter.Instance.IsOpen<FirstRechargeWin>()) { WindowCenter.Instance.CloseImmediately<FirstRechargeWin>(); WindowCenter.Instance.Close<FirstRechargeWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); } } @@ -584,7 +584,7 @@ return; } if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>() || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() || WindowCenter.Instance.ExistAnyFullScreenOrMaskWin() || NewBieCenter.Instance.inGuiding || WindowCenter.Instance.IsOpen<VipExperienceWin>()) { @@ -989,7 +989,7 @@ if (!NewBieCenter.Instance.inGuiding && WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !waitingJump) { if (PlayerDatas.Instance.baseData.coinPointTotal > 0 && !firstChargeRewardGet && firstRechargeOpen && !WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()) && firstRechargeOpen && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { firstRechargeOpen = false; WindowCenter.Instance.Close<MainInterfaceWin>(); System/Vip/VipWin.cs
@@ -169,7 +169,7 @@ if (win is TreasureNewGotWin) { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<VipRechargeWin>(); WindowCenter.Instance.Close<VipRechargeWin>(); } } System/Voice/VoiceRecorder.cs
@@ -78,7 +78,7 @@ { StopCoroutine(cacheCoroutine); cacheCoroutine = null; WindowCenter.Instance.CloseImmediately<MonitorVoiceWin>(); WindowCenter.Instance.Close<MonitorVoiceWin>(); AudioListener.volume = 1f; } } @@ -139,7 +139,7 @@ cacheCoroutine = null; } WindowCenter.Instance.CloseImmediately<MonitorVoiceWin>(); WindowCenter.Instance.Close<MonitorVoiceWin>(); if (Microphone.devices == null || Microphone.devices.Length == 0) { System/Welfare/AwardExchangeWin.cs
@@ -91,7 +91,7 @@ string wxCode = passward.Substring(0, 2); if (wxCode == "wx") { WindowCenter.Instance.CloseImmediately<WelfareWin>(); WindowCenter.Instance.Close<WelfareWin>(); } } } System/Welfare/LevelGiftWin.cs
@@ -162,12 +162,12 @@ }); _cell.vipBtn.RemoveAllListeners(); _cell.vipBtn.AddListener(() => _cell.vipBtn.AddListener((UnityEngine.Events.UnityAction)(() => { WindowJumpMgr.Instance.ClearJumpData(); WindowCenter.Instance.CloseImmediately<WelfareWin>(); WindowCenter.Instance.Close<WelfareWin>(); WindowCenter.Instance.Open<VipRechargeWin>(false, 0); }); })); } private void PlayerDataRefreshInfoEvent(PlayerDataRefresh _type) System/WindowBase/PopupWindowsProcessor.cs
New file @@ -0,0 +1,112 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using Snxxz.UI; public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor> { List<PopupWindow> popupWindowQueue = new List<PopupWindow>(); PopupWindow currentWindow; public void Add(string name, int functionId = 0) { var popupWindow = new PopupWindow() { window = name, functionId = functionId, }; if (popupWindowQueue.Contains(popupWindow)) { popupWindowQueue.Remove(popupWindow); } popupWindowQueue.Add(popupWindow); } public void Remove(string name, int functionId = 0) { var popupWindow = new PopupWindow() { window = name, functionId = functionId, }; if (popupWindowQueue.Contains(popupWindow)) { popupWindowQueue.Remove(popupWindow); } } private void LateUpdate() { if (StageLoad.Instance.isLoading) { return; } if (StageLoad.Instance.currentStage == null) { return; } if (StageLoad.Instance.stageType == Stage.E_StageType.MainCity) { return; } if (MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID)) { return; } if (NewBieCenter.Instance.inGuiding) { return; } if (popupWindowQueue.Count == 0) { return; } if (currentWindow != default(PopupWindow)) { if (!WindowCenter.Instance.IsOpen(currentWindow.window) && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { currentWindow = popupWindowQueue[0]; popupWindowQueue.RemoveAt(0); WindowCenter.Instance.Open(currentWindow.window, false, currentWindow.functionId); } } else { if (!WindowCenter.Instance.ExistAnyFullScreenOrMaskWin()) { currentWindow = popupWindowQueue[0]; popupWindowQueue.RemoveAt(0); WindowCenter.Instance.Open(currentWindow.window, false, currentWindow.functionId); } } } public struct PopupWindow { public string window; public int functionId; public static bool operator ==(PopupWindow lhs, PopupWindow rhs) { return lhs.window == rhs.window && lhs.functionId == rhs.functionId; } public static bool operator !=(PopupWindow lhs, PopupWindow rhs) { return lhs.window != rhs.window || lhs.functionId != rhs.functionId; } } } System/WindowBase/PopupWindowsProcessor.cs.meta
File was renamed from Lua/Gen/LuaWindowUtilityWrap.cs.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 1dc4c7af13f65cc40af69f4ab5d97f52 timeCreated: 1548853306 guid: 69dd101b31790db40b5e9330b97ab957 timeCreated: 1549177055 licenseType: Pro MonoImporter: serializedVersion: 2 System/WindowBase/WindowCenter.cs
@@ -1,24 +1,25 @@ using System.Collections.Generic; using System.Collections; using System.Collections.Generic; using UnityEngine; using System; namespace Snxxz.UI { [XLua.LuaCallCSharp] public class WindowCenter : Singleton<WindowCenter> public class WindowCenter : SingletonMonobehaviour<WindowCenter> { public event Action<Window> windowBeforeOpenEvent; public event Action<Window> windowAfterOpenEvent; public event Action<Window> windowBeforeCloseEvent; public event Action<Window> windowAfterCloseEvent; public event Action<Window> jumpWindowCloseEvent; List<string> closeAllIgnoreWindows = new List<string>() { "MessageWin", "NewBieWin", "NewItemGetWin", "AttributePromoteShowWin" ,"DungeonBeginCoolDownWin","DungeonFightWin","StatusTipWin" ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin", "TreasureDungeonMissionHintWin","FairyGrabBossHintWin","DungeonFairyFeastHintWin","PetAndMountPushWin","UpgradeWin","DungeonFairyLandWin" ,"GatherSoulDungeonHintWin" }; "MessageWin", "NewBieWin", "NewItemGetWin", "AttributePromoteShowWin" ,"DungeonBeginCoolDownWin","DungeonFightWin","StatusTipWin" ,"ScrollTipWin","MarqueeWin","ExperienceOpenWin","TrumpetWin","BattlePrepareCoolDownWin","DungeonGradeWin","BattleHintWin", "TreasureDungeonMissionHintWin","FairyGrabBossHintWin","DungeonFairyFeastHintWin","PetAndMountPushWin","UpgradeWin","DungeonFairyLandWin" ,"GatherSoulDungeonHintWin" }; UIRoot m_UIRoot; public UIRoot uiRoot { @@ -52,151 +53,9 @@ } } int m_PreCreateWindowNum = 0; public bool isPreCreating { get { return m_PreCreateWindowNum > 0; } } Dictionary<string, Window> windows = new Dictionary<string, Window>(); public void OpenFromLocal<T>() where T : Window { var windowName = typeof(T).Name; OpenFromLocal(windowName); } public void OpenFromLocal(string _name) { Window win = null; if (TryGetWindow(_name, out win)) { if (win.windowState == Window.WindowState.Closed) { win.functionOrder = 0; win.playAnimation = true; win.Open(); } else { DebugEx.LogFormat("{0} 窗口已经打开!", _name); } } else { win = GetWindowInstance(_name, true); if (win != null) { win.functionOrder = 0; win.playAnimation = true; win.Open(); } } } public T Open<T>(bool _forceSync = false, int _functionalOrder = 0) where T : Window { var name = typeof(T).Name; var window = Open(name, _forceSync, _functionalOrder); if (window != null) { return window as T; } else { return null; } } public Window Open(string _name, bool _forceSync = false, int _functionalOrder = 0) { if (VersionConfig.Get().isBanShu) { if (_name == "VipRechargeWin") { SysNotifyMgr.Instance.ShowTip("FuncNoOpen_VIP"); return null; } } var childWindow = string.Empty; if (_forceSync || AssetSource.uiFromEditor) { return OpenSingleWindow(_name, _forceSync, _functionalOrder); } else { if (WindowConfig.Get().FindChildWindow(_name, _functionalOrder, out childWindow)) { WindowTrim(childWindow); if (!windows.ContainsKey(childWindow)) { GetWindowInstanceAsync(childWindow, (bool _ok, UnityEngine.Object _object) => { if (_ok) { OpenSingleWindow(_name, _forceSync, _functionalOrder); } }); return null; } else { return OpenSingleWindow(_name, _forceSync, _functionalOrder); } } else { return OpenSingleWindow(_name, _forceSync, _functionalOrder); } } } public T OpenWithoutAnimation<T>() where T : Window { var name = typeof(T).Name; var window = OpenWithoutAnimation(name); if (window != null) { return window as T; } else { return null; } } public Window OpenWithoutAnimation(string _name) { Window win = null; if (TryGetWindow(_name, out win)) { if (win.windowState == Window.WindowState.Closed) { win.functionOrder = 0; win.playAnimation = false; win.Open(); } else { DebugEx.LogFormat("{0} 窗口已经打开!", _name); } return win; } win = GetWindowInstance(_name, false); if (win != null) { win.functionOrder = 0; win.playAnimation = false; win.Open(); } return win; } Windows windows = new Windows(); List<OpenCommand> openCommands = new List<OpenCommand>(); List<CloseCommand> closeCommands = new List<CloseCommand>(); public T Get<T>() where T : Window { @@ -213,11 +72,11 @@ } public Window Get(string _window) public Window Get(string name) { if (windows.ContainsKey(_window)) if (windows.ContainsKey(name)) { return windows[_window]; return windows[name]; } else { @@ -225,75 +84,127 @@ } } public T Close<T>() where T : Window public void OpenFromLocal<T>() where T : Window { T win = null; if (TryGetWindow<T>(out win)) var command = new OpenCommand() { if (win.windowState != Window.WindowState.Closed) { win.CloseImmediately(); } else { DebugEx.LogFormat("{0} 窗口已经关闭!", typeof(T)); } name = typeof(T).Name, sync = true, playAnimatioin = false, fromBuiltIn = true, functionOrder = 0 }; PushOpenCommand(command); } public void OpenFromLocal(string name) { var command = new OpenCommand() { name = name, sync = true, playAnimatioin = false, fromBuiltIn = true, functionOrder = 0 }; PushOpenCommand(command); } public void Open<T>(bool forceSync = false, int functionOrder = 0) where T : Window { var command = new OpenCommand() { name = typeof(T).Name, sync = forceSync, playAnimatioin = true, fromBuiltIn = false, functionOrder = functionOrder }; PushOpenCommand(command); } public void Open(string name, bool forceSync = false, int functionOrder = 0) { var command = new OpenCommand() { name = name, sync = forceSync, playAnimatioin = true, fromBuiltIn = false, functionOrder = functionOrder }; PushOpenCommand(command); } private void PushOpenCommand(OpenCommand command) { var name = command.name; var index = closeCommands.FindIndex((x) => { return x.name == name; }); if (index != -1) { closeCommands.RemoveAt(index); } var exist = openCommands.Exists((x) => { return x.name == name; }); if (!exist) { openCommands.Add(command); } } public void Close<T>() where T : Window { PushCloseCommand(new CloseCommand() { name = typeof(T).Name, }); } public void Close(string name) { if (WindowConfig.Get().IsChildWindow(name)) { CloseImmediately(name); } else { asyncLoad.StopTask(typeof(T).Name); DebugEx.LogFormat("{0} 窗口无法获得!", typeof(T)); PushCloseCommand(new CloseCommand() { name = name, }); } return win; } public Window Close(string _name) public void CloseImmediately(string name) { if (windows.ContainsKey(_name)) Window window; if (windows.TryGetValue(name, out window)) { var window = windows[_name]; if (window.windowState != Window.WindowState.Closed) { window.CloseImmediately(); } else { DebugEx.LogFormat("{0} 窗口已经关闭!", _name); } return window; } else { asyncLoad.StopTask(_name); DebugEx.LogFormat("{0} 窗口无法获得!", _name); return null; } } public T CloseImmediately<T>() where T : Window private void PushCloseCommand(CloseCommand command) { T win = null; if (TryGetWindow<T>(out win)) var name = command.name; var index = openCommands.FindIndex((x) => { return x.name == name; }); if (index != -1) { if (win.windowState != Window.WindowState.Closed) { win.CloseImmediately(); } else { DebugEx.LogFormat("{0} 窗口已经关闭!", typeof(T)); } } else { asyncLoad.StopTask(typeof(T).Name); DebugEx.LogFormat("{0} 窗口无法获得!", typeof(T)); openCommands.RemoveAt(index); } return win; var exist = closeCommands.Exists((x) => { return x.name == name; }); if (!exist) { closeCommands.Add(command); } } public List<string> GetAll() @@ -301,40 +212,43 @@ return new List<string>(windows.Keys); } public void CloseAll(CloseAllIgnoreType _ignoreType = CloseAllIgnoreType.System) public void CloseAll(CloseAllIgnoreType ignoreType = CloseAllIgnoreType.System) { foreach (var window in windows.Values) for (var i = windows.Keys.Count - 1; i >= 0; i--) { var name = windows.Keys[i]; var window = windows[name]; if (window == null) { continue; } var isIgnore = false; switch (_ignoreType) switch (ignoreType) { case CloseAllIgnoreType.Base: isIgnore = window.windowInfo.windowType <= WindowType.Base; break; case CloseAllIgnoreType.BaseAndCustom: isIgnore = window.windowInfo.windowType <= WindowType.Base || closeAllIgnoreWindows.Contains(window.name); isIgnore = window.windowInfo.windowType <= WindowType.Base || closeAllIgnoreWindows.Contains(name); break; case CloseAllIgnoreType.System: isIgnore = window.windowInfo.windowType >= WindowType.System; break; case CloseAllIgnoreType.Custom: isIgnore = closeAllIgnoreWindows.Contains(window.name); isIgnore = closeAllIgnoreWindows.Contains(name); break; case CloseAllIgnoreType.SystemAndCustom: isIgnore = window.windowInfo.windowType >= WindowType.System || closeAllIgnoreWindows.Contains(window.name); isIgnore = window.windowInfo.windowType >= WindowType.System || closeAllIgnoreWindows.Contains(name); break; } isIgnore = isIgnore || WindowConfig.Get().IsChildWindow(name); if (!isIgnore) { if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening) { window.CloseImmediately(); Close(name); } } } @@ -344,9 +258,17 @@ public void CloseOthers<T>() where T : Window { foreach (var window in windows.Values) for (var i = windows.Keys.Count - 1; i >= 0; i--) { if (window is T) var name = windows.Keys[i]; var window = windows[name]; if (window == null || window is T) { continue; } var isIgnore = closeAllIgnoreWindows.Contains(name) || WindowConfig.Get().IsChildWindow(name); if (isIgnore) { continue; } @@ -355,7 +277,7 @@ { if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening) { window.CloseImmediately(); Close(name); } } } @@ -363,40 +285,44 @@ asyncLoad.StopAllTasks(); } public void CloseOthers(List<string> _windowNames, CloseAllIgnoreType _ignoreType) public void CloseOthers(List<string> windowNames, CloseAllIgnoreType ignoreType) { foreach (var window in windows.Values) for (var i = windows.Keys.Count - 1; i >= 0; i--) { var name = windows.Keys[i]; var window = windows[name]; if (window == null) { continue; } var isIgnore = false; switch (_ignoreType) switch (ignoreType) { case CloseAllIgnoreType.Base: isIgnore = _windowNames.Contains(window.name) || window.windowInfo.windowType <= WindowType.Base; isIgnore = windowNames.Contains(name) || window.windowInfo.windowType <= WindowType.Base; break; case CloseAllIgnoreType.BaseAndCustom: isIgnore = _windowNames.Contains(window.name) || window.windowInfo.windowType <= WindowType.Base || closeAllIgnoreWindows.Contains(window.name); isIgnore = windowNames.Contains(name) || window.windowInfo.windowType <= WindowType.Base || closeAllIgnoreWindows.Contains(name); break; case CloseAllIgnoreType.System: isIgnore = _windowNames.Contains(window.name) || window.windowInfo.windowType >= WindowType.System; isIgnore = windowNames.Contains(name) || window.windowInfo.windowType >= WindowType.System; break; case CloseAllIgnoreType.Custom: isIgnore = _windowNames.Contains(window.name) || closeAllIgnoreWindows.Contains(window.name); isIgnore = windowNames.Contains(name) || closeAllIgnoreWindows.Contains(name); break; case CloseAllIgnoreType.SystemAndCustom: isIgnore = _windowNames.Contains(window.name) || window.windowInfo.windowType >= WindowType.System || closeAllIgnoreWindows.Contains(window.name); isIgnore = windowNames.Contains(name) || window.windowInfo.windowType >= WindowType.System || closeAllIgnoreWindows.Contains(name); break; } isIgnore = isIgnore || WindowConfig.Get().IsChildWindow(name); if (!isIgnore) { if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening) { window.CloseImmediately(); Close(name); } } } @@ -404,9 +330,9 @@ asyncLoad.StopAllTasks(); } public void DestoryWinsByStage(WindowStage _windowStage) public void DestoryWinsByStage(WindowStage windowStage) { switch (_windowStage) switch (windowStage) { case WindowStage.Launch: DestroyWin<DownLoadWin>(); @@ -426,7 +352,7 @@ break; } UnLoadAssetBundle(_windowStage); UnLoadAssetBundle(windowStage); } public void DestroyWin<T>() where T : Window @@ -434,28 +360,28 @@ DestroyWin(typeof(T).Name); } public void DestroyWin(string _name) public void DestroyWin(string name) { if (windows.ContainsKey(_name)) if (windows.ContainsKey(name)) { var win = windows[_name]; var win = windows[name]; win.CloseImmediately(); GameObject.Destroy(win.gameObject); MonoBehaviour.Destroy(win); windows[_name] = null; windows.Remove(_name); windows[name] = null; windows.Remove(name); } else { DebugEx.LogFormat("{0} 窗口无法获得!", _name); DebugEx.LogFormat("{0} 窗口无法获得!", name); } } public void UnLoadAssetBundle(WindowStage _windowStage) public void UnLoadAssetBundle(WindowStage windowStage) { if (!AssetSource.uiFromEditor) { switch (_windowStage) switch (windowStage) { case WindowStage.Launch: break; @@ -489,11 +415,11 @@ } } public bool IsOpen(string _name) public bool IsOpen(string name) { if (windows.ContainsKey(_name) && windows[_name] != null) if (windows.ContainsKey(name) && windows[name] != null) { var window = windows[_name]; var window = windows[name]; return window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening; } else @@ -502,296 +428,299 @@ } } public bool ExitAnyFullScreenOrMaskWin() public bool ExistAnyFullScreenOrMaskWin() { bool exit = false; foreach (var window in windows.Values) var exist = false; foreach (var name in windows.Keys) { var window = windows[name]; if (window.windowInfo.needMask || window.windowInfo.fullScreen) { if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening) { exit = true; exist = true; break; } } } return exit; return exist; } /// <summary> /// 是否存在大于或等于这个层级的全屏或有模糊背景的界面 /// </summary> /// <param name="_windowType"></param> /// <param name="windowType"></param> /// <returns></returns> public bool ExitAnyFullScreenOrMaskWinLEqual(WindowType _windowType) public bool ExistAnyFullScreenOrMaskWinLEqual(WindowType windowType) { bool exit = false; foreach (var window in windows.Values) var exist = false; foreach (var name in windows.Keys) { if ((window.windowInfo.needMask || window.windowInfo.fullScreen) && window.windowInfo.windowType >= _windowType) var window = windows[name]; if ((window.windowInfo.needMask || window.windowInfo.fullScreen) && window.windowInfo.windowType >= windowType) { if (window.windowState == Window.WindowState.Opened || window.windowState == Window.WindowState.Opening) { exit = true; exist = true; break; } } } return exit; return exist; } internal void NotifyBeforeOpen<T>(T _window) where T : Window internal void NotifyBeforeOpen<T>(T window) where T : Window { if (windowBeforeOpenEvent != null) { windowBeforeOpenEvent(_window); windowBeforeOpenEvent(window); } } internal void NotifyAfterOpen<T>(T _window) where T : Window internal void NotifyAfterOpen<T>(T window) where T : Window { if (windowAfterOpenEvent != null) { windowAfterOpenEvent(_window); windowAfterOpenEvent(window); } } internal void NotifyBeforeClose<T>(T _window) where T : Window internal void NotifyBeforeClose<T>(T window) where T : Window { if (windowBeforeCloseEvent != null) { windowBeforeCloseEvent(_window); windowBeforeCloseEvent(window); } } internal void NotifyAfterClose<T>(T _window) where T : Window internal void NotifyAfterClose<T>(T window) where T : Window { if (windowAfterCloseEvent != null) { windowAfterCloseEvent(_window); windowAfterCloseEvent(window); } } internal void JumpNotifyAfterClose<T>(T _window) where T : Window internal void JumpNotifyAfterClose<T>(T window) where T : Window { if (jumpWindowCloseEvent != null) { jumpWindowCloseEvent(_window); jumpWindowCloseEvent(window); } } private T OpenSingleWindow<T>(bool _forceSync, int _functionalOrder) where T : Window { var name = typeof(T).Name; var window = OpenSingleWindow(name, _forceSync, _functionalOrder); if (window != null) { return window as T; } else { return null; } } private Window OpenSingleWindow(string _name, bool _forceSync, int _functionalOrder) { Window win = null; if (TryGetWindow(_name, out win)) { if (win.windowState == Window.WindowState.Closed) { win.functionOrder = _functionalOrder; win.playAnimation = true; win.Open(); } else { DebugEx.LogFormat("{0} 窗口已经打开!", _name); } return win; } if (_forceSync || AssetSource.uiFromEditor) { win = GetWindowInstance(_name, false); if (win != null) { win.functionOrder = _functionalOrder; win.playAnimation = true; win.Open(); } return win; } else { GetWindowInstanceAsync(_name, (bool ok, UnityEngine.Object _object) => { if (TryGetWindow(_name, out win)) { if (win.windowState == Window.WindowState.Closed) { win.functionOrder = _functionalOrder; win.playAnimation = true; win.Open(); } else { DebugEx.Log(string.Format("{0} 窗口已经打开!", _name)); } } } ); return null; } } private bool TryGetWindow<T>(out T _win) where T : Window private bool TryGetWindow<T>(out T win) where T : Window { var name = typeof(T).Name; Window window = null; if (TryGetWindow(name, out window)) { _win = windows[name] as T; return _win != null; win = windows[name] as T; return win != null; } else { _win = null; win = null; return false; } } private bool TryGetWindow(string _name, out Window _win) private bool TryGetWindow(string name, out Window win) { WindowTrim(_name); if (windows.ContainsKey(_name)) WindowTrim(name); if (windows.ContainsKey(name)) { _win = windows[_name]; return _win != null; win = windows[name]; return win != null; } else { _win = null; win = null; return false; } } private void WindowTrim(string _windowName) private void WindowTrim(string name) { if (windows.ContainsKey(_windowName)) if (windows.ContainsKey(name)) { if (windows[_windowName] == null || windows[_windowName].gameObject == null) if (windows[name] == null || windows[name].gameObject == null) { windows.Remove(_windowName); windows.Remove(name); } } } private T GetWindowInstance<T>(bool _fromLocal) where T : Window float checkTimer = 0f; private void LateUpdate() { var prefabName = typeof(T).Name; var window = GetWindowInstance(prefabName, _fromLocal); if (window != null) while (closeCommands.Count > 0) { return window as T; var command = closeCommands[0]; closeCommands.RemoveAt(0); Window window = null; if (windows.TryGetValue(command.name, out window)) { if (window.windowState != Window.WindowState.Closed) { window.CloseImmediately(); } } asyncLoad.StopTask(command.name); } while (openCommands.Count > 0) { var command = openCommands[0]; openCommands.RemoveAt(0); Window window = null; if (windows.TryGetValue(command.name, out window)) { if (window.windowState == Window.WindowState.Closed) { window.playAnimation = command.playAnimatioin; window.functionOrder = command.functionOrder; window.Open(); } else { DebugEx.LogFormat("{0} 窗口已经打开!", command.name); } } else { ExecuteFirstOpen(command); } } checkTimer += Time.deltaTime; if (checkTimer > 2f) { checkTimer = 0f; if (!StageLoad.Instance.isLoading) { var exceptOpen = StageLoad.Instance.stageType == Stage.E_StageType.Dungeon && !ExistAnyFullScreenOrMaskWinLEqual(WindowType.Base) && !IsOpen("DefaultDialogueBoxWin") && !IsOpen("DialogueDuidanceWin") && !IsOpen("TaskBoxBGMWin"); if (exceptOpen != IsOpen("MainInterfaceWin")) { if (exceptOpen) { Open("MainInterfaceWin", true); } else { Close("MainInterfaceWin"); } } } } } private void ExecuteFirstOpen(OpenCommand command) { GetWindowPrefab(command, (bool ok, GameObject prefab) => { if (ok) { CreateWindowInstance(command, prefab); Window window = null; if (windows.TryGetValue(command.name, out window)) { window.playAnimation = command.playAnimatioin; window.functionOrder = command.functionOrder; window.Open(); } } }); } private void GetWindowPrefab(OpenCommand command, Action<bool, GameObject> callBack) { if (command.sync) { var name = command.name; var fromBuiltIn = command.fromBuiltIn; var prefab = fromBuiltIn ? BuiltInLoader.LoadPrefab(name) : UILoader.LoadWindow(name); if (callBack != null) { callBack(prefab != null, prefab); } } else { return null; var name = command.name; var task = new WindowAsyncLoad.Task(name, (bool ok, UnityEngine.Object @object) => { var prefab = @object as GameObject; if (callBack != null) { callBack(prefab != null, prefab); } }); asyncLoad.PushTask(task); } } private Window GetWindowInstance(string _name, bool _fromLocal) private void CreateWindowInstance(OpenCommand command, GameObject prefab) { if (windows.ContainsKey(_name)) var name = command.name; Window window = null; if (!windows.ContainsKey(name)) { return windows[_name]; } else { var prefab = _fromLocal ? BuiltInLoader.LoadPrefab(_name) : UILoader.LoadWindow(_name); prefab.SetActive(false); var instance = GameObject.Instantiate(prefab); instance.name = _name; if (AssetSource.uiFromEditor) { prefab.SetActive(true); } if (_fromLocal) if (command.fromBuiltIn) { BuiltInLoader.UnLoadPrefab(_name); BuiltInLoader.UnLoadPrefab(name); } else { UILoader.UnLoadWindowAsset(_name); UILoader.UnLoadWindowAsset(name); } var window = instance.GetComponent<Window>(); window = instance.GetComponent<Window>(); var typeName = window.GetType().Name; instance.name = typeName; if (window != null) { windows[_name] = window; windows[typeName] = window; } else { DebugEx.LogFormat("无法获得 {0} 的资源!", _name); Debug.LogFormat("无法获得 {0} 的资源!", name); } return window; } } private void GetWindowInstanceAsync<T>(Action<bool, UnityEngine.Object> _callBack) where T : Window public struct OpenCommand { GetWindowInstanceAsync(typeof(T).Name, _callBack); public string name; public bool sync; public int functionOrder; public bool playAnimatioin; public bool fromBuiltIn; } private void GetWindowInstanceAsync(string _name, Action<bool, UnityEngine.Object> _callBack) public struct CloseCommand { Action<bool, UnityEngine.Object> addAction = (bool _ok, UnityEngine.Object _object) => { var prefabName = _name; Window window = null; if (!windows.ContainsKey(_name)) { var prefab = _object as GameObject; prefab.SetActive(false); var instance = GameObject.Instantiate(prefab); if (AssetSource.uiFromEditor) { prefab.SetActive(true); } UILoader.UnLoadWindowAsset(prefabName); window = instance.GetComponent<Window>(); var typeName = window.GetType().Name; instance.name = typeName; if (window != null) { windows[typeName] = window; } else { Debug.LogFormat("无法获得 {0} 的资源!", _name); } } if (_callBack != null) { _callBack(_ok && window != null, _object); } }; asyncLoad.PushTask(new WindowAsyncLoad.Task(_name, addAction)); public string name; } public enum WindowStage @@ -811,7 +740,43 @@ SystemAndCustom = 5, } class Windows { Dictionary<string, Window> windows = new Dictionary<string, Window>(); List<string> windowKeys = new List<string>(); public Window this[string key] { get { return windows[key]; } set { windows[key] = value; if (!windowKeys.Contains(key)) { windowKeys.Add(key); } } } public List<string> Keys { get { return windowKeys; } } public bool ContainsKey(string key) { return windowKeys.Contains(key); } public bool TryGetValue(string key, out Window window) { return windows.TryGetValue(key, out window); } public void Remove(string key) { windows.Remove(key); windowKeys.Remove(key); } } } } System/WindowBase/WindowCenter.cs.meta
@@ -1,7 +1,7 @@ fileFormatVersion: 2 guid: fb7efc17b82bf2a49b54d834e7a16882 timeCreated: 1446995491 licenseType: Free guid: 49491c2e1a98ff64c80a02f3ef705515 timeCreated: 1549000703 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] System/WindowBase/Windows.cs
File was deleted System/WindowBase/Windows.cs.meta
File was deleted System/WorldMap/MapUtility.cs
@@ -85,4 +85,11 @@ return config.MapFBType != (int)MapType.OpenCountry; } public static bool IsCrossServerMap(int mapId) { var dataMapId = GetDataMapId(mapId); return dataMapId == CrossServerOneVsOneModel.CrossServerDataMapId || dataMapId == CrossServerBossModel.DATA_MAPID; } } System/WorldMap/WorldMapWin.cs
@@ -45,8 +45,8 @@ protected override void OnAfterOpen() { WindowCenter.Instance.CloseImmediately<MainInterfaceWin>(); WindowCenter.Instance.CloseImmediately<KnapSackWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Close<KnapSackWin>(); } protected override void OnPreClose() UI/Core/CanvasAddition.cs
@@ -49,10 +49,10 @@ culling = false; break; case CullingFullScreenType.Any: culling = WindowCenter.Instance.ExitAnyFullScreenOrMaskWin(); culling = WindowCenter.Instance.ExistAnyFullScreenOrMaskWin(); break; default: culling = WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual((WindowType)m_Culling); culling = WindowCenter.Instance.ExistAnyFullScreenOrMaskWinLEqual((WindowType)m_Culling); break; } @@ -68,10 +68,10 @@ culling = false; break; case CullingFullScreenType.Any: culling = WindowCenter.Instance.ExitAnyFullScreenOrMaskWin(); culling = WindowCenter.Instance.ExistAnyFullScreenOrMaskWin(); break; default: culling = WindowCenter.Instance.ExitAnyFullScreenOrMaskWinLEqual((WindowType)m_Culling); culling = WindowCenter.Instance.ExistAnyFullScreenOrMaskWinLEqual((WindowType)m_Culling); break; }