refactor(core): Removed ICamera

This commit is contained in:
Syntriax 2024-01-30 12:13:47 +03:00
parent 9853e0af36
commit 9768dbdded
2 changed files with 0 additions and 27 deletions

View File

@ -1,12 +0,0 @@
using System;
namespace Syntriax.Engine.Core.Abstract;
public interface ICamera : IAssignableTransform
{
Action<ICamera>? OnZoomChanged { get; set; }
float Zoom { get; set; }
void Update();
}

View File

@ -11,7 +11,6 @@ namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("GameObject Count: {_gameObjects.Count}")] [System.Diagnostics.DebuggerDisplay("GameObject Count: {_gameObjects.Count}")]
public class GameManager : IGameManager public class GameManager : IGameManager
{ {
public Action<GameManager>? OnCameraChanged { get; set; } = null;
public Action<GameManager, IGameObject>? OnGameObjectRegistered { get; set; } = null; public Action<GameManager, IGameObject>? OnGameObjectRegistered { get; set; } = null;
public Action<GameManager, IGameObject>? OnGameObjectUnRegistered { get; set; } = null; public Action<GameManager, IGameObject>? OnGameObjectUnRegistered { get; set; } = null;
@ -26,7 +25,6 @@ public class GameManager : IGameManager
private IStateEnable _stateEnable = null!; private IStateEnable _stateEnable = null!;
private GameObjectFactory _gameObjectFactory = null!; private GameObjectFactory _gameObjectFactory = null!;
private bool _initialized = false; private bool _initialized = false;
private ICamera _camera = null!;
private GameObjectFactory GameObjectFactory private GameObjectFactory GameObjectFactory
{ {
@ -56,19 +54,6 @@ public class GameManager : IGameManager
} }
} }
public ICamera Camera
{
get => _camera;
set
{
if (_camera == value)
return;
_camera = value;
OnCameraChanged?.Invoke(this);
}
}
public void RegisterGameObject(IGameObject gameObject) public void RegisterGameObject(IGameObject gameObject)
{ {
if (_gameObjects.Contains(gameObject)) if (_gameObjects.Contains(gameObject))