mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2026-04-22 01:45:55 +08:00
Update EcsPool.cs
This commit is contained in:
parent
14f8c1a72f
commit
9cdae69d17
@ -385,6 +385,26 @@ namespace DCFApixels.DragonECS
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Other
|
#region Other
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public void InvokeOnAdd(int entityID, ref T component)
|
||||||
|
{
|
||||||
|
if (_isCustomLifecycle)
|
||||||
|
{
|
||||||
|
_customLifecycle.OnAdd(ref component, _worldID, entityID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
public void InvokeOnDel(int entityID, ref T component)
|
||||||
|
{
|
||||||
|
if (_isCustomLifecycle)
|
||||||
|
{
|
||||||
|
_customLifecycle.OnDel(ref component, _worldID, entityID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
component = default;
|
||||||
|
}
|
||||||
|
}
|
||||||
void IEcsPool.AddEmpty(int entityID) { Add(entityID); }
|
void IEcsPool.AddEmpty(int entityID) { Add(entityID); }
|
||||||
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
void IEcsPool.AddRaw(int entityID, object dataRaw)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user