mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-17 17:34:36 +08:00
Update entlong.cs
This commit is contained in:
parent
ed4b101e90
commit
6b42dc07b9
@ -147,6 +147,20 @@ namespace DCFApixels.DragonECS
|
||||
return IsAlive;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Unpack(out int id)
|
||||
{
|
||||
#if DEBUG
|
||||
if (IsAlive == false) { Throw.Ent_ThrowIsNotAlive(this); }
|
||||
#elif DRAGONECS_STABILITY_MODE
|
||||
if (IsAlive == false)
|
||||
{
|
||||
id = EcsConsts.NULL_ENTITY_ID;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
id = _id;
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Unpack(out int id, out EcsWorld world)
|
||||
{
|
||||
@ -216,6 +230,12 @@ namespace DCFApixels.DragonECS
|
||||
id = _id;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryUnpack(out int id)
|
||||
{
|
||||
id = _id;
|
||||
return IsAlive;
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public bool TryUnpack(out int id, out EcsWorld world)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user