BREAKING CHANGE: IEntities are now IInitialize
This commit is contained in:
parent
5a01b01215
commit
251bd948ab
|
@ -1,5 +1,5 @@
|
|||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface IEntity : IAssignableStateEnable
|
||||
public interface IEntity : IInitialize, IAssignableStateEnable
|
||||
{
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ using System;
|
|||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public interface IInitialize : IEntity
|
||||
public interface IInitialize
|
||||
{
|
||||
Action<IInitialize>? OnInitialized { get; set; }
|
||||
Action<IInitialize>? OnFinalized { get; set; }
|
||||
|
|
|
@ -10,7 +10,7 @@ using Syntriax.Engine.Core.Factory;
|
|||
|
||||
namespace Syntriax.Engine.Core;
|
||||
|
||||
public class GameManager : IInitialize
|
||||
public class GameManager : IEntity
|
||||
{
|
||||
public Action<IInitialize>? OnInitialized { get; set; } = null;
|
||||
public Action<IInitialize>? OnFinalized { get; set; } = null;
|
||||
|
|
|
@ -30,7 +30,7 @@ public class StateEnable : IStateEnable
|
|||
|
||||
public bool Assign(IEntity entity)
|
||||
{
|
||||
if (_entity is not null) // TODO: Add IInitialize to IAssignable or IEntity maybe?
|
||||
if (_entity.Initialized)
|
||||
return false;
|
||||
|
||||
_entity = entity;
|
||||
|
|
Loading…
Reference in New Issue