refactor: Fixed Compiler Warning On Possible Null
This commit is contained in:
parent
6dec7dd720
commit
9b45bfa4fd
|
@ -37,7 +37,20 @@ public class GameManager : IEntity
|
||||||
|
|
||||||
public bool Initialized => _initialized;
|
public bool Initialized => _initialized;
|
||||||
public IList<IGameObject> GameObjects => _gameObjects;
|
public IList<IGameObject> GameObjects => _gameObjects;
|
||||||
public IStateEnable StateEnable { get { if (_stateEnable is null) Assign(new StateEnableFactory().Instantiate(this)); return _stateEnable; } }
|
public IStateEnable StateEnable
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_stateEnable is null)
|
||||||
|
{
|
||||||
|
Assign(new StateEnableFactory().Instantiate(this));
|
||||||
|
if (_stateEnable is null)
|
||||||
|
throw NotAssignedException.From(this, _stateEnable);
|
||||||
|
}
|
||||||
|
|
||||||
|
return _stateEnable;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RegisterGameObject(IGameObject gameObject)
|
public void RegisterGameObject(IGameObject gameObject)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue