mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
RootComponent
This commit is contained in:
@@ -381,7 +381,7 @@ GameObject:
|
|||||||
- component: {fileID: 2061060682}
|
- component: {fileID: 2061060682}
|
||||||
- component: {fileID: 2061060683}
|
- component: {fileID: 2061060683}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: GameMain
|
m_Name: Root
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
@@ -6,8 +6,8 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace TEngine.Editor
|
namespace TEngine.Editor
|
||||||
{
|
{
|
||||||
[CustomEditor(typeof(BaseComponent))]
|
[CustomEditor(typeof(RootComponent))]
|
||||||
internal sealed class BaseComponentInspector : GameFrameworkInspector
|
internal sealed class RootComponentInspector : 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();
|
||||||
|
|
||||||
BaseComponent t = (BaseComponent)target;
|
RootComponent t = (RootComponent)target;
|
||||||
|
|
||||||
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
|
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
|
||||||
{
|
{
|
@@ -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();
|
||||||
BaseComponent baseComponent = GetComponent<BaseComponent>();
|
RootComponent rootComponent = GetComponent<RootComponent>();
|
||||||
if (baseComponent != null)
|
if (rootComponent != null)
|
||||||
{
|
{
|
||||||
baseComponent.Shutdown();
|
rootComponent.Shutdown();
|
||||||
baseComponent = null;
|
rootComponent = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_GameFrameworkComponents.Clear();
|
s_GameFrameworkComponents.Clear();
|
||||||
|
@@ -32,8 +32,7 @@ namespace TEngine
|
|||||||
/// 基础组件。
|
/// 基础组件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
[AddComponentMenu("TEngine/MemoryPool")]
|
public sealed class MemoryPoolComponent : GameFrameworkComponent
|
||||||
public sealed class MemoryPoolComponent : MonoBehaviour
|
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private MemoryStrictCheckType m_EnableStrictCheck = MemoryStrictCheckType.AlwaysEnable;
|
private MemoryStrictCheckType m_EnableStrictCheck = MemoryStrictCheckType.AlwaysEnable;
|
||||||
|
@@ -8,7 +8,7 @@ namespace TEngine
|
|||||||
/// 基础组件。
|
/// 基础组件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DisallowMultipleComponent]
|
[DisallowMultipleComponent]
|
||||||
public sealed class BaseComponent : GameFrameworkComponent
|
public sealed class RootComponent : GameFrameworkComponent
|
||||||
{
|
{
|
||||||
private const int DefaultDpi = 96; // default windows dpi
|
private const int DefaultDpi = 96; // default windows dpi
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ namespace TEngine
|
|||||||
private string m_JsonHelperTypeName = "TEngine.DefaultJsonHelper";
|
private string m_JsonHelperTypeName = "TEngine.DefaultJsonHelper";
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private int m_FrameRate = 30;
|
private int m_FrameRate = 120;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private float m_GameSpeed = 1f;
|
private float m_GameSpeed = 1f;
|
Reference in New Issue
Block a user