mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 09:54:35 +08:00
add IEcsPool.AddEmpty
This commit is contained in:
parent
13d0d41966
commit
90c2b5fbd0
@ -259,6 +259,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
|
void IEcsPool.AddEmpty(int entityID) { Add(entityID); }
|
||||||
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
||||||
{
|
{
|
||||||
Add(entityID) = dataRaw == null ? default : (T)dataRaw;
|
Add(entityID) = dataRaw == null ? default : (T)dataRaw;
|
||||||
|
@ -88,6 +88,12 @@ namespace DCFApixels.DragonECS.Internal
|
|||||||
{
|
{
|
||||||
#if (DEBUG && !DISABLE_DEBUG)
|
#if (DEBUG && !DISABLE_DEBUG)
|
||||||
throw new NullInstanceException();
|
throw new NullInstanceException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
void IEcsPool.AddEmpty(int entityID)
|
||||||
|
{
|
||||||
|
#if (DEBUG && !DISABLE_DEBUG)
|
||||||
|
throw new NullInstanceException();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
||||||
@ -101,7 +107,7 @@ namespace DCFApixels.DragonECS.Internal
|
|||||||
#if (DEBUG && !DISABLE_DEBUG)
|
#if (DEBUG && !DISABLE_DEBUG)
|
||||||
throw new NullInstanceException();
|
throw new NullInstanceException();
|
||||||
#else
|
#else
|
||||||
return null;
|
return null;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
void IEcsPool.SetRaw(int entity, object dataRaw)
|
void IEcsPool.SetRaw(int entity, object dataRaw)
|
||||||
@ -179,6 +185,7 @@ namespace DCFApixels.DragonECS
|
|||||||
public interface IEcsPool : IEcsReadonlyPool
|
public interface IEcsPool : IEcsReadonlyPool
|
||||||
{
|
{
|
||||||
#region Methods
|
#region Methods
|
||||||
|
void AddEmpty(int entityID);
|
||||||
void AddRaw(int entityID, object dataRaw);
|
void AddRaw(int entityID, object dataRaw);
|
||||||
void SetRaw(int entityID, object dataRaw);
|
void SetRaw(int entityID, object dataRaw);
|
||||||
void Del(int entityID);
|
void Del(int entityID);
|
||||||
|
@ -224,6 +224,7 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
|
void IEcsPool.AddEmpty(int entityID) { Add(entityID); }
|
||||||
void IEcsPool.AddRaw(int entityID, object dataRaw) { Add(entityID); }
|
void IEcsPool.AddRaw(int entityID, object dataRaw) { Add(entityID); }
|
||||||
object IEcsReadonlyPool.GetRaw(int entityID)
|
object IEcsReadonlyPool.GetRaw(int entityID)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user