fix: IGameObjects Not Being Initialized Properly
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
|
||||
using Syntriax.Engine.Core.Exceptions;
|
||||
|
||||
namespace Syntriax.Engine.Core.Abstract;
|
||||
|
||||
public abstract class BaseEntity : IEntity
|
||||
@@ -72,6 +74,8 @@ public abstract class BaseEntity : IEntity
|
||||
|
||||
UnassignInternal();
|
||||
|
||||
_stateEnable = null!;
|
||||
_stateEnable.Unassign();
|
||||
OnUnassigned?.Invoke(this);
|
||||
return true;
|
||||
}
|
||||
@@ -82,6 +86,8 @@ public abstract class BaseEntity : IEntity
|
||||
if (IsInitialized)
|
||||
return false;
|
||||
|
||||
NotAssignedException.Check(this, _stateEnable);
|
||||
|
||||
InitializeInternal();
|
||||
|
||||
IsInitialized = true;
|
||||
|
Reference in New Issue
Block a user