/// <summary> /// 关闭游戏框架。 /// </summary> /// <param name="shutdownType">关闭游戏框架类型。</param> public static void Shutdown(ShutdownType shutdownType) { Log.Info("Shutdown Game Framework ({0})...", shutdownType.ToString()); BaseComponent baseComponent = GetComponent <BaseComponent>(); if (baseComponent != null) { baseComponent.Shutdown(); baseComponent = null; } s_GameFrameworkComponents.Clear(); if (shutdownType == ShutdownType.None) { return; } if (shutdownType == ShutdownType.Restart) { SceneManager.LoadScene(GameFrameworkSceneId); return; } if (shutdownType == ShutdownType.Quit) { Application.Quit(); #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #endif return; } }
private void Reset() { m_DownloadCounterNodes.Clear(); m_CurrentSpeed = 0f; m_Accumulator = 0f; m_TimeLeft = 0f; }
internal override void Shutdown() { for (LinkedListNode <DataInfo> current = m_linkedListDataInfos.Last; current != null; current = current.Previous) { current.Value.Data.Shutdown(); } m_dicDataInfos.Clear(); m_linkedListDataInfos.Clear(); }
/// <summary> /// 关闭并清理任务管理器。 /// </summary> internal override void Shutdown() { CancelAllTasks(null); foreach (TaskBase task in m_Tasks) { ReferencePool.Release(task); } m_Tasks.Clear(); }
/// <summary> /// 关闭游戏框架。 /// </summary> /// <param name="shutdownType">关闭游戏框架类型。</param> public static void Shutdown(ShutdownType shutdownType) { //TODO 关闭游戏框架 s_GameFrameworkComponents.Clear(); if (shutdownType == ShutdownType.None) { return; } if (shutdownType == ShutdownType.Restart) { return; } if (shutdownType == ShutdownType.Quit) { } }