private void Awake() { s_instance = this; if (UniversalInputManager.UsePhoneUI != null) { Transform transform = this.m_menuButton.transform; transform.localScale = (Vector3)(transform.localScale * 2f); Transform transform2 = this.m_friendButton.transform; transform2.localScale = (Vector3)(transform2.localScale * 2f); } else { this.m_connectionIndicator.gameObject.SetActive(false); } this.m_initialWidth = base.GetComponent <Renderer>().bounds.size.x; this.m_initialFriendButtonScaleX = this.m_friendButton.transform.localScale.x; this.m_initialMenuButtonScaleX = this.m_menuButton.transform.localScale.x; this.m_menuButton.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnMenuButtonReleased)); this.m_friendButton.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnFriendButtonReleased)); this.ToggleEnableButtons(false); this.m_batteryLevel.gameObject.SetActive(false); FatalErrorMgr.Get().AddErrorListener(new FatalErrorMgr.ErrorCallback(this.OnFatalError)); SceneMgr.Get().RegisterSceneLoadedEvent(new SceneMgr.SceneLoadedCallback(this.OnSceneLoaded)); SpectatorManager.Get().OnInviteReceived += new SpectatorManager.InviteReceivedHandler(this.SpectatorManager_OnInviteReceived); SpectatorManager.Get().OnSpectatorToMyGame += new SpectatorManager.SpectatorToMyGameHandler(this.SpectatorManager_OnSpectatorToMyGame); SpectatorManager.Get().OnSpectatorModeChanged += new SpectatorManager.SpectatorModeChangedHandler(this.SpectatorManager_OnSpectatorModeChanged); ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); this.m_lightingBlend = this.m_menuButtonMesh.GetComponent <Renderer>().material.GetFloat("_LightingBlend"); if (UniversalInputManager.UsePhoneUI != null) { this.m_batteryLevel = this.m_batteryLevelPhone; this.m_currentTime.gameObject.SetActive(false); } this.m_menuButton.SetPhoneStatusBarState(0); }
private void Awake() { s_instance = this; UnityEngine.Object.DontDestroyOnLoad(base.gameObject); SceneMgr.Get().RegisterSceneLoadedEvent(new SceneMgr.SceneLoadedCallback(this.OnSceneChange)); ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); }
private void ClearAssets(long startTimestamp, long endTimestamp) { object[] args = new object[] { startTimestamp, endTimestamp, endTimestamp - startTimestamp }; Log.LoadingScreen.Print("LoadingScreen.ClearAssets() - START startTimestamp={0} endTimestamp={1} diff={2}", args); AssetCache.ClearAllCachesBetween(startTimestamp, endTimestamp); ApplicationMgr.Get().UnloadUnusedAssets(); }
public static void quitHearthstoneAndRun() { Blizzard.Log.Warning("Hearthstone was not run from Battle.net Client"); if (!bootstrapper.Exists) { Blizzard.Log.Warning("Hearthstone could not find Battle.net client"); Error.AddFatalLoc("GLUE_CANNOT_FIND_BATTLENET_CLIENT", new object[0]); } else { try { Process process2 = new Process { StartInfo = { UseShellExecute = false, FileName = bootstrapper.FullName, Arguments = "-uid hs_beta" }, EnableRaisingEvents = true }; process2.Start(); Blizzard.Log.Warning("Hearthstone ran Battle.net Client. Exiting."); ApplicationMgr.Get().Exit(); } catch (Exception exception) { Error.AddFatalLoc("GLUE_CANNOT_RUN_BATTLENET_CLIENT", new object[0]); object[] args = new object[] { exception.Message }; Blizzard.Log.Warning("Hearthstone could not launch Battle.net client: {0}", args); } } }
public static FixedRewardsMgr Get() { if (s_instance == null) { s_instance = new FixedRewardsMgr(); ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); } if (!s_instance.m_registeredForAdventureProgressUpdates) { s_instance.m_registeredForAdventureProgressUpdates = AdventureProgressMgr.Get().RegisterProgressUpdatedListener(new AdventureProgressMgr.AdventureProgressUpdatedCallback(s_instance.OnAdventureProgressUpdate)); } if (!s_instance.m_registeredForProfileNotices) { NetCache.Get().RegisterNewNoticesListener(new NetCache.DelNewNoticesListener(s_instance.OnNewNotices)); s_instance.m_registeredForProfileNotices = true; } if (!s_instance.m_registeredForCompletedAchieves) { AchieveManager.Get().RegisterNewlyCompletedAchievesListener(new AchieveManager.NewlyAcompletedAchievesCallback(s_instance.OnNewlyCompletedAchieves)); s_instance.m_registeredForCompletedAchieves = true; } if (!s_instance.m_registeredForAccountLicenseUpdates) { AccountLicenseMgr.Get().RegisterAccountLicensesChangedListener(new AccountLicenseMgr.AccountLicensesChangedCallback(s_instance.OnAccountLicensesUpdate)); s_instance.m_registeredForAccountLicenseUpdates = true; } return(s_instance); }
private void Awake() { s_instance = this; UnityEngine.Object.DontDestroyOnLoad(base.gameObject); FatalErrorMgr.Get().AddErrorListener(new FatalErrorMgr.ErrorCallback(this.OnFatalError)); this.m_transitioning = true; ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); }
public void NotifyExitPressed() { Log.Mike.Print("FatalErrorDialog.NotifyExitPressed() - BEGIN", new object[0]); this.SendAcknowledgements(); Log.Mike.Print("FatalErrorDialog.NotifyExitPressed() - calling ApplicationMgr.Get().Exit()", new object[0]); ApplicationMgr.Get().Exit(); Log.Mike.Print("FatalErrorDialog.NotifyExitPressed() - END", new object[0]); }
public static void Run() { Debug.Log("Hello from Test.ComponentTest"); var rootGO = ApplicationMgr.Get().gameObject; rootGO.AddComponent(typeof(FrameBehaviour)); }
private void OnDestroy() { SpectatorManager.Get().OnInviteReceived -= new SpectatorManager.InviteReceivedHandler(this.SpectatorManager_OnInviteReceived); SpectatorManager.Get().OnSpectatorToMyGame -= new SpectatorManager.SpectatorToMyGameHandler(this.SpectatorManager_OnSpectatorToMyGame); SpectatorManager.Get().OnSpectatorModeChanged -= new SpectatorManager.SpectatorModeChangedHandler(this.SpectatorManager_OnSpectatorModeChanged); ApplicationMgr.Get().WillReset -= new System.Action(this.WillReset); s_instance = null; }
public static FriendChallengeMgr Get() { if (s_instance == null) { s_instance = new FriendChallengeMgr(); ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); } return(s_instance); }
public static DemoMgr Get() { if (s_instance == null) { s_instance = new DemoMgr(); } ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); return(s_instance); }
public static BnetNearbyPlayerMgr Get() { if (s_instance == null) { s_instance = new BnetNearbyPlayerMgr(); ApplicationMgr.Get().WillReset += new System.Action(s_instance.Clear); } return(s_instance); }
private void OnOptionsMenuHidden() { UnityEngine.Object.Destroy(this.m_optionsMenu.gameObject); this.m_optionsMenu = null; AssetCache.ClearGameObject((string)this.OPTIONS_MENU_NAME); if ((!SceneMgr.Get().IsModeRequested(SceneMgr.Mode.FATAL_ERROR) && !ApplicationMgr.Get().IsResetting()) && BnetBar.Get().IsEnabled()) { this.Show(); } }
private void OnClick(UIEvent e) { if (ApplicationMgr.AllowResetFromFatalError != null) { if (this.m_redirectToStore) { PlatformDependentValue <string> value4 = new PlatformDependentValue <string>(PlatformCategory.OS) { iOS = "https://itunes.apple.com/app/hearthstone-heroes-warcraft/id625257520?ls=1&mt=8", Android = "https://play.google.com/store/apps/details?id=com.blizzard.wtcg.hearthstone" }; PlatformDependentValue <string> value2 = value4; value4 = new PlatformDependentValue <string>(PlatformCategory.OS) { iOS = "https://itunes.apple.com/cn/app/lu-shi-chuan-shuo-mo-shou/id841140063?ls=1&mt=8", Android = "https://www.battlenet.com.cn/account/download/hearthstone/android?style=hearthstone" }; PlatformDependentValue <string> value3 = value4; if (ApplicationMgr.GetAndroidStore() == AndroidStore.AMAZON) { value2.Android = "http://www.amazon.com/gp/mas/dl/android?p=com.blizzard.wtcg.hearthstone"; } if (MobileDeviceLocale.GetCurrentRegionId() == Network.BnetRegion.REGION_CN) { value2 = value3; } Application.OpenURL((string)value2); } else { float waitDuration = (ApplicationMgr.Get().LastResetTime() + this.m_delayBeforeNextReset) - UnityEngine.Time.realtimeSinceStartup; Log.JMac.Print("Remaining time to wait before allowing a reconnect attempt: " + waitDuration, new object[0]); if (waitDuration > 0f) { this.m_inputBlocker.RemoveEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnClick)); this.m_closedSignText.Text = GameStrings.Get("GLOBAL_SPLASH_CLOSED_RECONNECTING"); this.m_allowClick = false; this.m_reconnectTip.gameObject.SetActive(false); base.StartCoroutine(this.WaitBeforeReconnecting(waitDuration)); } else { UnityEngine.Debug.Log("resetting!"); this.m_inputBlocker.RemoveEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnClick)); ApplicationMgr.Get().Reset(); } } } else { this.m_inputBlocker.RemoveEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnClick)); ApplicationMgr.Get().Exit(); } }
private void OnBnetErrorResponse(AlertPopup.Response response, object userData) { if (ApplicationMgr.AllowResetFromFatalError != null) { ApplicationMgr.Get().Reset(); } else { ApplicationMgr.Get().Exit(); } }
public static void Init() { if (s_instance == null) { s_instance = new AdventureProgressMgr(); Network.Get().RegisterNetHandler(AdventureProgressResponse.PacketID.ID, new Network.NetHandler(s_instance.OnAdventureProgress), null); NetCache.Get().RegisterNewNoticesListener(new NetCache.DelNewNoticesListener(s_instance.OnNewNotices)); ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); } Network.RequestAdventureProgress(); }
public static DefLoader Get() { if (s_instance == null) { s_instance = new DefLoader(); if (ApplicationMgr.Get() != null) { ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); } } return(s_instance); }
private void Awake() { s_Instance = this; if (Options.Get().GetBool(Option.HEALTHY_GAMING_DEBUG, false)) { this.m_DebugMode = true; } this.m_NextCheckTime = UnityEngine.Time.realtimeSinceStartup + 45f; ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); ApplicationMgr.Get().Resetting += new System.Action(this.OnReset); FatalErrorMgr.Get().AddErrorListener(new FatalErrorMgr.ErrorCallback(this.OnFatalError)); base.StartCoroutine(this.InitNetworkData()); }
private void OnDestroy() { ApplicationMgr.Get().WillReset -= new System.Action(s_instance.WillReset); if (SceneMgr.Get() != null) { SceneMgr.Get().UnregisterScenePreUnloadEvent(new SceneMgr.ScenePreUnloadCallback(this.OnScenePreUnload)); } if (ApplicationMgr.IsInternal()) { Options.Get().UnregisterChangedListener(Option.IDLE_KICK_TIME, new Options.ChangedCallback(this.OnOptionChanged)); Options.Get().UnregisterChangedListener(Option.IDLE_KICKER, new Options.ChangedCallback(this.OnOptionChanged)); } s_instance = null; }
public static AccountLicenseMgr Get() { if (s_instance == null) { s_instance = new AccountLicenseMgr(); ApplicationMgr.Get().WillReset += new System.Action(s_instance.WillReset); } if (!s_instance.m_registeredForProfileNotices) { NetCache.Get().RegisterNewNoticesListener(new NetCache.DelNewNoticesListener(s_instance.OnNewNotices)); s_instance.m_registeredForProfileNotices = true; } return(s_instance); }
private void OnTimeoutDialogResponse(AlertPopup.Response response, object userData) { this.m_dialog = null; if (!Network.IsLoggedIn()) { if (ApplicationMgr.AllowResetFromFatalError != null) { ApplicationMgr.Get().Reset(); } else { ApplicationMgr.Get().Exit(); } } }
private void Awake() { s_instance = this; this.m_bundlesToDownload = new List <string>(); this.m_downloadableBundles = new Map <string, AssetBundle>(); if (ApplicationMgr.GetMobileEnvironment() == MobileEnv.PRODUCTION) { m_remoteUri = "http://dist.blizzard.com/hs-pod/dlc/"; m_remoteUriCN = "http://client{0}.pdl.battlenet.com.cn/hs-pod/dlc/"; } else { m_remoteUri = "http://streaming-t5.corp.blizzard.net/hearthstone/dlc/"; } m_remoteUri = m_remoteUri + "win/"; ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); }
public void ClearCachesAndFreeMemory(int severity) { UnityEngine.Debug.LogWarning(string.Format("Clearing Caches; this will force assets to be reloaded off disk and may be slow! {0}", severity)); if (StoreManager.Get() != null) { StoreManager.Get().UnloadAndFreeMemory(); } if (severity > 15) { if (SpellCache.Get() != null) { SpellCache.Get().Clear(); } AssetCache.ClearAllCaches(true, false); } ApplicationMgr.Get().UnloadUnusedAssets(); }
private void OnChangeLanguageConfirmationResponse(AlertPopup.Response response, object userData) { if (response == AlertPopup.Response.CANCEL) { this.m_languageDropdown.setSelection(this.GetCurrentLanguage()); return; } string localeName = null; string str2 = (string)userData; IEnumerator enumerator = Enum.GetValues(typeof(Locale)).GetEnumerator(); try { while (enumerator.MoveNext()) { Locale current = (Locale)((int)enumerator.Current); if (str2 == GameStrings.Get(this.StringNameFromLocale(current))) { localeName = current.ToString(); goto Label_0095; } } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable == null) { } disposable.Dispose(); } Label_0095: if (localeName == null) { Debug.LogError(string.Format("OptionsMenu.OnChangeLanguageConfirmationResponse() - locale not found", new object[0])); } else { Localization.SetLocaleName(localeName); Options.Get().SetString(Option.LOCALE, localeName); this.Hide(false); ApplicationMgr.Get().Reset(); } }
public override bool AnimateContentExitStart() { if (this.m_animating) { return(false); } this.m_animating = true; if (this.m_deckCompleteHighlight != null) { this.m_deckCompleteHighlight.SetActive(false); } iTween.StopByName(base.gameObject, "position"); object[] args = new object[] { "position", this.GetOffscreenLocalPosition(), "isLocal", true, "time", 0.3f, "easeType", iTween.EaseType.easeInQuad, "name", "position" }; iTween.MoveTo(base.gameObject, iTween.Hash(args)); SoundManager.Get().LoadAndPlay("panel_slide_off_deck_creation_screen", base.gameObject); ApplicationMgr.Get().ScheduleCallback(0.5f, false, delegate(object o) { this.m_animating = false; }, null); return(true); }
public bool MoveNext() { uint num = (uint)this.$PC; this.$PC = -1; switch (num) { case 0: case 1: if (LoadingScreen.Get().IsPreviousSceneActive() || LoadingScreen.Get().IsFadingOut()) { this.$current = null; this.$PC = 1; return(true); } ApplicationMgr.Get().Reset(); this.$PC = -1; break; } return(false); }
private static void <> m__257(AlertPopup.Response response, object userData) { ApplicationMgr.Get().Reset(); }
private void Start() { ApplicationMgr.Get().WillReset += new System.Action(this.WillReset); }
private void OnDestroy() { GameMgr.Get().UnregisterFindGameEvent(new GameMgr.FindGameCallback(this.OnFindGameEvent)); ApplicationMgr.Get().WillReset -= new System.Action(this.WillReset); s_instance = null; }
private void OnReconnectingDialogResponse(AlertPopup.Response response, object userData) { this.m_dialog = null; ApplicationMgr.Get().Exit(); }