Update
This commit is contained in:
ALEXTANG
2022-08-08 19:43:20 +08:00
parent ef5ffb1599
commit d535bd1e88
8 changed files with 59 additions and 36 deletions

View File

@@ -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");
}
}
}

View File

@@ -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
}
}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c17cc9558bd3bb349a91660a81e5777f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View 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);
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 346c9f88d1d5fd849bb40f376c5ee7ba
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View 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");
}
}
}

View File

@@ -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
{