DI updates

This commit is contained in:
2025-03-17 18:43:45 +01:00
parent 569b1d00b3
commit f80fd22a00
18 changed files with 42 additions and 53 deletions

View File

@@ -2,6 +2,7 @@
using Cysharp.Threading.Tasks;
using RebootKit.Engine.Foundation;
using RebootKit.Engine.Services.Console;
using UnityEngine.Assertions;
namespace RebootKit.Engine.Services.Game {
public class GameService : IService {
@@ -11,7 +12,7 @@ namespace RebootKit.Engine.Services.Game {
private GameMode _gameMode;
private bool _running;
public async UniTask OnInit(CancellationToken cancellationToken) {
public async UniTask OnWakeUp(CancellationToken cancellationToken) {
await UniTask.Yield(cancellationToken);
}
@@ -21,6 +22,8 @@ namespace RebootKit.Engine.Services.Game {
}
public async UniTask Start(GameModeAsset asset, CancellationToken cancellationToken) {
Assert.IsNotNull(asset);
_gameMode = asset.Create();
await _gameMode.Start(cancellationToken);