mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TE6 打飞机Demo
TE6 打飞机Demo
This commit is contained in:
@@ -10,9 +10,14 @@ using Random = UnityEngine.Random;
|
||||
/// <summary>
|
||||
/// 战斗房间
|
||||
/// </summary>
|
||||
[Update]
|
||||
public class BattleSystem : BehaviourSingleton<BattleSystem>
|
||||
public class BattleSystem : Singleton<BattleSystem>
|
||||
{
|
||||
protected override void OnInit()
|
||||
{
|
||||
Utility.Unity.AddUpdateListener(Update);
|
||||
base.OnInit();
|
||||
}
|
||||
|
||||
private enum ESteps
|
||||
{
|
||||
None,
|
||||
@@ -106,7 +111,7 @@ public class BattleSystem : BehaviourSingleton<BattleSystem>
|
||||
GameEvent.RemoveEventListener<Vector3, Quaternion>(ActorEventDefine.EnemyFireBullet, OnEnemyFireBullet);
|
||||
}
|
||||
|
||||
public override void Update()
|
||||
public void Update()
|
||||
{
|
||||
UpdateRoom();
|
||||
}
|
||||
|
@@ -10,6 +10,6 @@ public class BhvApplicationQuit : MonoBehaviour
|
||||
}
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
YooAssets.Destroy();
|
||||
|
||||
}
|
||||
}
|
@@ -44,7 +44,7 @@ namespace GameLogic
|
||||
private async UniTaskVoid OnClickRestartBtn()
|
||||
{
|
||||
await UniTask.Yield();
|
||||
await GameModule.Scene.LoadScene("scene_battle").ToUniTask();
|
||||
await GameModule.Scene.LoadSceneAsync("scene_battle");
|
||||
|
||||
BattleSystem.Instance.DestroyRoom();
|
||||
BattleSystem.Instance.LoadRoom().Forget();
|
||||
|
Reference in New Issue
Block a user