feat: IGameManager

This commit is contained in:
2024-01-30 12:08:21 +03:00
parent 0461454793
commit 9853e0af36
2 changed files with 27 additions and 3 deletions

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
namespace Syntriax.Engine.Core.Abstract;
public interface IGameManager : IEntity, IEnumerable<IGameObject>
{
Action<GameManager, IGameObject>? OnGameObjectRegistered { get; set; }
Action<GameManager, IGameObject>? OnGameObjectUnRegistered { get; set; }
IReadOnlyList<IGameObject> GameObjects { get; }
void RegisterGameObject(IGameObject gameObject);
T InstantiateGameObject<T>(params object?[]? args) where T : class, IGameObject;
IGameObject RemoveGameObject(IGameObject gameObject);
void Update(EngineTime time);
void PreDraw();
}