mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update
Update
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,7 +5,6 @@ namespace TEngine
|
||||
{
|
||||
public class TEngineEntry : UnitySingleton<TEngineEntry>
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
8
Assets/TEngine/Runtime/GameEntry.meta
Normal file
8
Assets/TEngine/Runtime/GameEntry.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c17cc9558bd3bb349a91660a81e5777f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
20
Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs
Normal file
20
Assets/TEngine/Runtime/GameEntry/GameEntry.RegisterSystem.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 346c9f88d1d5fd849bb40f376c5ee7ba
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
19
Assets/TEngine/Runtime/GameEntry/GameEntry.cs
Normal file
19
Assets/TEngine/Runtime/GameEntry/GameEntry.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace TEngine
|
||||
{
|
||||
public partial class GameEntry:MonoBehaviour
|
||||
{
|
||||
void Start()
|
||||
{
|
||||
TEngineEntry.Active();
|
||||
RegisterSystem();
|
||||
OnStartGame();
|
||||
}
|
||||
|
||||
void OnStartGame()
|
||||
{
|
||||
TLogger.LogError("OnStartGame");
|
||||
}
|
||||
}
|
||||
}
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user