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