From d535bd1e88fe7fcfce21e53291d065b70fdae963 Mon Sep 17 00:00:00 2001 From: ALEXTANG <574809918@qq.com> Date: Mon, 8 Aug 2022 19:43:20 +0800 Subject: [PATCH] Update Update --- Assets/TEngine/Runtime/Core/GameEntry.cs | 23 ------------------- Assets/TEngine/Runtime/Core/TEngineEntry.cs | 8 ------- Assets/TEngine/Runtime/GameEntry.meta | 8 +++++++ .../GameEntry/GameEntry.RegisterSystem.cs | 20 ++++++++++++++++ .../GameEntry.RegisterSystem.cs.meta | 11 +++++++++ Assets/TEngine/Runtime/GameEntry/GameEntry.cs | 19 +++++++++++++++ .../{Core => GameEntry}/GameEntry.cs.meta | 0 Assets/TEngine/Runtime/Net/DataCenterSys.cs | 6 +---- 8 files changed, 59 insertions(+), 36 deletions(-) delete mode 100644 Assets/TEngine/Runtime/Core/GameEntry.cs create mode 100644 Assets/TEngine/Runtime/GameEntry.meta create mode 100644 Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs create mode 100644 Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta create mode 100644 Assets/TEngine/Runtime/GameEntry/GameEntry.cs rename Assets/TEngine/Runtime/{Core => GameEntry}/GameEntry.cs.meta (100%) diff --git a/Assets/TEngine/Runtime/Core/GameEntry.cs b/Assets/TEngine/Runtime/Core/GameEntry.cs deleted file mode 100644 index 3ca50449..00000000 --- a/Assets/TEngine/Runtime/Core/GameEntry.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TEngine; -using UnityEngine; - -namespace Assets.TEngine.Runtime.Core -{ - public class GameEntry:MonoBehaviour - { - void Start() - { - TEngineEntry.Instance.OnStartGame += OnStartGame; - } - - void OnStartGame() - { - TLogger.LogError("OnStartGame"); - } - } -} diff --git a/Assets/TEngine/Runtime/Core/TEngineEntry.cs b/Assets/TEngine/Runtime/Core/TEngineEntry.cs index 79dd2734..468ac8ea 100644 --- a/Assets/TEngine/Runtime/Core/TEngineEntry.cs +++ b/Assets/TEngine/Runtime/Core/TEngineEntry.cs @@ -5,7 +5,6 @@ namespace TEngine { public class TEngineEntry : UnitySingleton { - public System.Action OnStartGame; protected override void OnLoad() { InitLibImp(); @@ -97,8 +96,6 @@ namespace TEngine var logic = listLogic[i]; logic.OnStart(); } - TLogger.LogInfo("TEngine:StartGame"); - StartGame(); } public void Update() @@ -156,11 +153,6 @@ namespace TEngine base.OnDestroy(); SingletonMgr.Release(); } - - protected virtual void StartGame() - { - OnStartGame?.Invoke(); - } #endregion } } \ No newline at end of file diff --git a/Assets/TEngine/Runtime/GameEntry.meta b/Assets/TEngine/Runtime/GameEntry.meta new file mode 100644 index 00000000..02603084 --- /dev/null +++ b/Assets/TEngine/Runtime/GameEntry.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c17cc9558bd3bb349a91660a81e5777f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs new file mode 100644 index 00000000..e6b3b6c1 --- /dev/null +++ b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TEngine.Net; +using UI; + +namespace TEngine +{ + partial class GameEntry + { + void RegisterSystem() + { + TEngineEntry.Instance.AddLogicSys(DataCenterSys.Instance); + TEngineEntry.Instance.AddLogicSys(BehaviourSingleSystem.Instance); + TEngineEntry.Instance.AddLogicSys(UISys.Instance); + } + } +} diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta new file mode 100644 index 00000000..43dddae6 --- /dev/null +++ b/Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 346c9f88d1d5fd849bb40f376c5ee7ba +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TEngine/Runtime/GameEntry/GameEntry.cs b/Assets/TEngine/Runtime/GameEntry/GameEntry.cs new file mode 100644 index 00000000..4cd5f684 --- /dev/null +++ b/Assets/TEngine/Runtime/GameEntry/GameEntry.cs @@ -0,0 +1,19 @@ +using UnityEngine; + +namespace TEngine +{ + public partial class GameEntry:MonoBehaviour + { + void Start() + { + TEngineEntry.Active(); + RegisterSystem(); + OnStartGame(); + } + + void OnStartGame() + { + TLogger.LogError("OnStartGame"); + } + } +} diff --git a/Assets/TEngine/Runtime/Core/GameEntry.cs.meta b/Assets/TEngine/Runtime/GameEntry/GameEntry.cs.meta similarity index 100% rename from Assets/TEngine/Runtime/Core/GameEntry.cs.meta rename to Assets/TEngine/Runtime/GameEntry/GameEntry.cs.meta diff --git a/Assets/TEngine/Runtime/Net/DataCenterSys.cs b/Assets/TEngine/Runtime/Net/DataCenterSys.cs index 43846aa2..9c7e4420 100644 --- a/Assets/TEngine/Runtime/Net/DataCenterSys.cs +++ b/Assets/TEngine/Runtime/Net/DataCenterSys.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; namespace TEngine.Net {