mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
RootModule
RootModule
This commit is contained in:
@@ -6,8 +6,8 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace TEngine.Editor
|
namespace TEngine.Editor
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(RootComponent))]
|
[CustomEditor(typeof(RootModule))]
|
||||||
internal sealed class RootComponentInspector : GameFrameworkInspector
|
internal sealed class RootModuleInspector : GameFrameworkInspector
|
||||||
{
|
{
|
||||||
private const string NoneOptionName = "<None>";
|
private const string NoneOptionName = "<None>";
|
||||||
private static readonly float[] GameSpeed = new float[] { 0f, 0.01f, 0.1f, 0.25f, 0.5f, 1f, 1.5f, 2f, 4f, 8f };
|
private static readonly float[] GameSpeed = new float[] { 0f, 0.01f, 0.1f, 0.25f, 0.5f, 1f, 1.5f, 2f, 4f, 8f };
|
||||||
@@ -41,7 +41,7 @@ namespace TEngine.Editor
|
|||||||
|
|
||||||
serializedObject.Update();
|
serializedObject.Update();
|
||||||
|
|
||||||
RootComponent t = (RootComponent)target;
|
RootModule t = (RootModule)target;
|
||||||
|
|
||||||
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
|
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
|
||||||
{
|
{
|
@@ -9,14 +9,14 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
private sealed class EnvironmentInformationWindow : ScrollableDebuggerWindowBase
|
private sealed class EnvironmentInformationWindow : ScrollableDebuggerWindowBase
|
||||||
{
|
{
|
||||||
private RootComponent m_RootComponent = null;
|
private RootModule _mRootModule = null;
|
||||||
|
|
||||||
private ResourceComponent m_ResourceComponent = null;
|
private ResourceComponent m_ResourceComponent = null;
|
||||||
|
|
||||||
public override void Initialize(params object[] args)
|
public override void Initialize(params object[] args)
|
||||||
{
|
{
|
||||||
m_RootComponent = GameEntry.GetComponent<RootComponent>();
|
_mRootModule = GameEntry.GetComponent<RootModule>();
|
||||||
if (m_RootComponent == null)
|
if (_mRootModule == null)
|
||||||
{
|
{
|
||||||
Log.Fatal("Base component is invalid.");
|
Log.Fatal("Base component is invalid.");
|
||||||
return;
|
return;
|
||||||
|
@@ -78,11 +78,11 @@ namespace TEngine
|
|||||||
{
|
{
|
||||||
Log.Info("Shutdown Game Framework ({0})...", shutdownType);
|
Log.Info("Shutdown Game Framework ({0})...", shutdownType);
|
||||||
Utility.Unity.Release();
|
Utility.Unity.Release();
|
||||||
RootComponent rootComponent = GetComponent<RootComponent>();
|
RootModule rootModule = GetComponent<RootModule>();
|
||||||
if (rootComponent != null)
|
if (rootModule != null)
|
||||||
{
|
{
|
||||||
rootComponent.Shutdown();
|
rootModule.Shutdown();
|
||||||
rootComponent = null;
|
rootModule = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_GameFrameworkComponents.Clear();
|
s_GameFrameworkComponents.Clear();
|
||||||
|
@@ -8,7 +8,7 @@ namespace TEngine
|
|||||||
/// 基础组件。
|
/// 基础组件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
public sealed class RootComponent : GameFrameworkComponent
|
public sealed class RootModule : GameFrameworkComponent
|
||||||
{
|
{
|
||||||
private const int DefaultDpi = 96; // default windows dpi
|
private const int DefaultDpi = 96; // default windows dpi
|
||||||
|
|
@@ -63,8 +63,8 @@ namespace TEngine
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
RootComponent rootComponent = GameEntry.GetComponent<RootComponent>();
|
RootModule rootModule = GameEntry.GetComponent<RootModule>();
|
||||||
if (rootComponent == null)
|
if (rootModule == null)
|
||||||
{
|
{
|
||||||
Log.Fatal("Base component is invalid.");
|
Log.Fatal("Base component is invalid.");
|
||||||
return;
|
return;
|
||||||
|
@@ -12,7 +12,7 @@ public class GameModule:MonoBehaviour
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取游戏基础模块。
|
/// 获取游戏基础模块。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static RootComponent Base { get; private set; }
|
public static RootModule Base { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取调试模块。
|
/// 获取调试模块。
|
||||||
@@ -51,7 +51,7 @@ public class GameModule:MonoBehaviour
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static void InitFrameWorkComponents()
|
public static void InitFrameWorkComponents()
|
||||||
{
|
{
|
||||||
Base = Get<RootComponent>();
|
Base = Get<RootModule>();
|
||||||
Debugger = Get<DebuggerComponent>();
|
Debugger = Get<DebuggerComponent>();
|
||||||
Fsm = Get<FsmComponent>();
|
Fsm = Get<FsmComponent>();
|
||||||
ObjectPool = Get<ObjectPoolComponent>();
|
ObjectPool = Get<ObjectPoolComponent>();
|
||||||
|
Reference in New Issue
Block a user