refactor(core): Removed ICamera
This commit is contained in:
parent
9853e0af36
commit
9768dbdded
|
@ -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();
|
||||
}
|
|
@ -11,7 +11,6 @@ namespace Syntriax.Engine.Core;
|
|||
[System.Diagnostics.DebuggerDisplay("GameObject Count: {_gameObjects.Count}")]
|
||||
public class GameManager : IGameManager
|
||||
{
|
||||
public Action<GameManager>? OnCameraChanged { get; set; } = null;
|
||||
public Action<GameManager, IGameObject>? OnGameObjectRegistered { get; set; } = null;
|
||||
public Action<GameManager, IGameObject>? OnGameObjectUnRegistered { get; set; } = null;
|
||||
|
||||
|
@ -26,7 +25,6 @@ public class GameManager : IGameManager
|
|||
private IStateEnable _stateEnable = null!;
|
||||
private GameObjectFactory _gameObjectFactory = null!;
|
||||
private bool _initialized = false;
|
||||
private ICamera _camera = null!;
|
||||
|
||||
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)
|
||||
{
|
||||
if (_gameObjects.Contains(gameObject))
|
||||
|
|
Loading…
Reference in New Issue