protected override IEnumerator Load() { string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName(); AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName); while (!bundleLoadRequest.get_isDone()) { yield return(null); } if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0) { Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 26, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\PlayerUIMainState.cs"); yield break; } UILoader <PlayerIconRoot> loader = new UILoader <PlayerIconRoot>(this, "PlayerLayerUI", "core/scenes/ui/player", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.LoadAssets()); m_ui.get_gameObject().SetActive(true); m_ui.Initialise(this); m_ui.LoadVisual(); }
protected override IEnumerator Load() { m_modifications = new WeaponAndDeckModifications(); m_modifications.Setup(); this.LoadAssetBundle(AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName()); this.LoadAssetBundle("core/ui/characters/companions"); string bundleName = AssetBundlesUtility.GetUICharacterResourcesBundleName(); AssetBundleLoadRequest bundleLoadRequest = AssetManager.LoadAssetBundle(bundleName); while (!bundleLoadRequest.get_isDone()) { yield return(null); } if (AssetManagerError.op_Implicit(bundleLoadRequest.get_error()) != 0) { Log.Error($"Error while loading bundle '{bundleName}' error={bundleLoadRequest.get_error()}", 48, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\DeckMainState.cs"); yield break; } UILoader <DeckUIRoot> loader = new UILoader <DeckUIRoot>(this, "PlayerLayer_DeckCanvas", "core/scenes/ui/deck", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.LoadAssets()); m_ui.get_gameObject().SetActive(true); m_ui.Initialise(m_modifications); }
protected override IEnumerator Load() { UILoader <ParametersUI> loader = new UILoader <ParametersUI>(this, "ParametersUI", "core/scenes/ui/option"); yield return(loader.Load()); m_ui = loader.ui; }
protected override IEnumerator Load() { UILoader <FightEndedUI> loader = new UILoader <FightEndedUI>(FightState.instance, this, GetSceneName(m_end), "core/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; }
protected override IEnumerator Load() { UILoader <LoginUI> loader = new UILoader <LoginUI>(this, "LoginUI", "core/scenes/ui/login"); yield return(loader.Load()); m_ui = loader.ui; m_ui.SetParams(PlayerPreferences.lastLogin, PlayerPreferences.lastPassword, PlayerPreferences.lastServer); }
protected override IEnumerator Load() { UILoader <EndGameStatsUIDemo> loader = new UILoader <EndGameStatsUIDemo>(FightState.instance, this, "EndGameStats", "demo/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; yield return(m_ui.Init(m_endResult, m_gameStatistics, m_fightTime)); }
protected override IEnumerator Load() { UILoader <MatchMakingUI> loader = new UILoader <MatchMakingUI>(this, "MatchmakingUI", "core/scenes/ui/matchmaking", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <CommonUI> loader = new UILoader <CommonUI>(this, "CommonUI", "core/scenes/ui/examples", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <LoginUIDemo> loader = new UILoader <LoginUIDemo>(this, "LoginUIDemo", "demo/scenes/ui/login", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(false); }
protected override IEnumerator Load() { string sceneName = (m_reason == FightStatusEndReason.Win) ? "FightEndedWinMatchUI" : "FightEndedDiedUI"; UILoader <BaseOpenCloseUI> loader = new UILoader <BaseOpenCloseUI>(this, sceneName, "core/scenes/ui/fight", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; }
protected override IEnumerator Load() { UILoader <TransitionUI> loader = new UILoader <TransitionUI>(this, "TransitionUI", "core/scenes/ui/transition", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); yield return(m_ui.OpenCoroutine()); }
protected override IEnumerator Load() { UILoader <NicknameRequestUI> loader = new UILoader <NicknameRequestUI>(this, "NicknameRequestUI", "core/scenes/ui/login", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); m_ui.OnNicknameRequest += OnNicknameRequest; }
protected override IEnumerator Load() { UILoader <UIZaapPVPSelection> loader = new UILoader <UIZaapPVPSelection>(this, "UIZaap_PVP", "core/scenes/maps/havre_maps", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); yield return(m_ui.LoadAssets()); }
protected override IEnumerator Load() { UILoader <GodSelectionRoot> loader = new UILoader <GodSelectionRoot>(this, "GodSelectionUI", "core/scenes/ui/player", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.Initialise(); m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <ProfileUIRoot> loader = new UILoader <ProfileUIRoot>(this, "PlayerLayer_ProfilCanvas", "core/scenes/ui/deck", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); m_ui.Initialise(); }
protected override IEnumerator Load() { UILoader <PopupInfoUI> loader = new UILoader <PopupInfoUI>(this, "PopupInfoUI", "core/scenes/ui/popup", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.Initialize(m_data); m_ui.get_gameObject().SetActive(true); yield return(m_ui.OpenCoroutine()); }
protected override IEnumerator Load() { UILoader <PlayerLayerNavRoot> loader = new UILoader <PlayerLayerNavRoot>(this, "PlayerLayer_NavRibbonCanvas", "core/scenes/ui/player", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); m_ui.Initialise(); m_ui.OnCloseAction = Quit; }
protected override IEnumerator Load() { UILoader <BugReportUI> loader = new UILoader <BugReportUI>(this, "BugReportUI", "core/scenes/ui/option", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; while (m_isCreatingUserReport) { yield return(null); } SetThumbnail(); m_ui.get_gameObject().SetActive(true); }
protected override IEnumerator Load() { UILoader <SelectLoginUI> loader = new UILoader <SelectLoginUI>(this, "SelectLoginUI", "core/scenes/ui/login", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); if (ApplicationConfig.haapiAllowed) { m_ui.OnConnectGuest += OnConnectGuest; m_ui.OnCreateGuest += OnCreateGuest; } else { m_ui.HideGuestSelection(); } m_ui.OnRegularAccount += OnRegularAccount; }
protected override IEnumerator Load() { AssetManager.LoadAssetBundle(AssetBundlesUtility.GetUIAnimatedCharacterResourcesBundleName()); UILoader <UIZaapPVPLoading> loader = new UILoader <UIZaapPVPLoading>(this, "MatchmakingUI_1v1", "core/scenes/maps/havre_maps", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.onForceAiRequested = OnForceAiRequested; m_ui.onCancelRequested = OnCancelRequested; m_ui.onEnterAnimationFinished = OnPlayRequested; yield return(m_ui.LoadAssets()); m_frame = new MatchMakingFrame { onGameCreated = OnGameCreated, onGameCanceled = OnGameCancel, onGameError = OnGameError }; }
protected override IEnumerator Load() { RuntimeData.currentKeywordContext = KeywordContext.DeckBuilding; float start = Time.get_realtimeSinceStartup(); UILoader <DeckUI> loader = new UILoader <DeckUI>(this, "DeckUI", "core/scenes/ui/deck", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); float num = Time.get_realtimeSinceStartup() - start; Log.Info($"Scene load duration : {num}", 84, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\PlayerUI\\DeckEditState.cs"); DeckBuildingEventController deckBuildingEventController = new DeckBuildingEventController(); deckBuildingEventController.OnCloseRequest += OnExit; deckBuildingEventController.OnSaveRequest += OnSave; deckBuildingEventController.OnCancelRequest += OnCancel; deckBuildingEventController.OnDeleteRequest += OnRemoveRequest; deckBuildingEventController.OnDeckSlotSelectionChanged += OnSelectionChanged; deckBuildingEventController.OnCloneRequest += OnCloneRequest; m_ui.eventController = deckBuildingEventController; }
protected override IEnumerator Load() { if (m_concurrentFightsCount == 1) { RuntimeData.currentKeywordContext = KeywordContext.FightSolo; } else { RuntimeData.currentKeywordContext = KeywordContext.FightMulti; } instance = this; int fightCount = m_concurrentFightsCount; if (!RuntimeData.fightDefinitions.TryGetValue(m_fightDefId, out m_fightDefinition)) { Log.Error(string.Format("Could not find {0} with id {1}.", "FightDefinition", m_fightDefId), 78, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs"); yield break; } yield return(RuntimeData.LoadTextCollectionAsync("Fight")); yield return(LoadSceneAndBundleRequest("FightMapWrapper", "core/scenes/maps/fight_maps")); Scene sceneByName = SceneManager.GetSceneByName("FightMapWrapper"); if (!sceneByName.get_isLoaded()) { Log.Error("Could not load scene named 'FightMapWrapper' from bundle 'core/scenes/maps/fight_maps'.", 93, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs"); yield break; } yield return(LoadFightMap()); FightMap current = FightMap.current; if (null == current) { Log.Error("Failed to load fight map.", 104, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\States\\FightState.cs"); yield break; } FightLogicExecutor.Initialize(fightCount); FightMapDefinition definition = current.definition; FightStatus[] array = new FightStatus[fightCount]; for (int i = 0; i < fightCount; i++) { FightMapStatus mapStatus = definition.CreateFightMapStatus(i); FightStatus fightStatus = new FightStatus(i, mapStatus); if (fightStatus.fightId == m_ownFightId) { FightStatus.local = fightStatus; } FightLogicExecutor.AddFightStatus(fightStatus); array[i] = fightStatus; } GameStatus.Initialize((FightType)m_fightInfo.FightType, m_fightDefinition, array); yield return(current.Initialize()); VisualEffectFactory.Initialize(); yield return(FightObjectFactory.Load()); if (!FightObjectFactory.isReady) { yield break; } yield return(FightSpellEffectFactory.Load(fightCount)); if (!FightSpellEffectFactory.isReady) { yield break; } yield return(FightUIFactory.Load()); if (!FightUIFactory.isReady) { yield break; } UILoader <FightUIRework> loaderRework = new UILoader <FightUIRework>(this, "FightUIRework", "core/scenes/ui/fight"); yield return(loaderRework.Load()); m_uiRework = loaderRework.ui; m_uiRework.Init(GameStatus.fightType, m_fightDefinition); frame = new FightFrame { onOtherPlayerLeftFight = OnOtherPlayerLeftFight }; if (m_hardResumed) { FightSnapshot snapshot = null; frame.onFightSnapshot = delegate(FightSnapshot fightSnapshot) { snapshot = fightSnapshot; }; frame.SendFightSnapshotRequest(); while (snapshot == null) { yield return(null); } frame.onFightSnapshot = null; yield return(ApplyFightSnapshot(snapshot)); } frame.SendPlayerReady(); while (!FightLogicExecutor.fightInitialized) { yield return(null); } yield return(uiRework.Load()); }