mirror of
https://github.com/DCFApixels/DragonECS.git
synced 2025-09-18 01:44:35 +08:00
add new unpack methods
This commit is contained in:
parent
8f76a1cf2e
commit
143faf24e0
@ -107,12 +107,33 @@ namespace DCFApixels.DragonECS
|
|||||||
world = EcsWorld.GetWorld(this.world);
|
world = EcsWorld.GetWorld(this.world);
|
||||||
return IsAlive;
|
return IsAlive;
|
||||||
}
|
}
|
||||||
|
public bool TryGetWorldID(out int worldID)
|
||||||
|
{
|
||||||
|
worldID = world;
|
||||||
|
return IsAlive;
|
||||||
|
}
|
||||||
|
public void Unpack(out EcsWorld world, out int id)
|
||||||
|
{
|
||||||
|
world = EcsWorld.GetWorld(this.world);
|
||||||
|
id = this.id;
|
||||||
|
}
|
||||||
|
public void Unpack(out int worldID, out int id)
|
||||||
|
{
|
||||||
|
worldID = world;
|
||||||
|
id = this.id;
|
||||||
|
}
|
||||||
public bool TryUnpack(out EcsWorld world, out int id)
|
public bool TryUnpack(out EcsWorld world, out int id)
|
||||||
{
|
{
|
||||||
world = EcsWorld.GetWorld(this.world);
|
world = EcsWorld.GetWorld(this.world);
|
||||||
id = this.id;
|
id = this.id;
|
||||||
return IsAlive;
|
return IsAlive;
|
||||||
}
|
}
|
||||||
|
public bool TryUnpack(out int worldID, out int id)
|
||||||
|
{
|
||||||
|
worldID = world;
|
||||||
|
id = this.id;
|
||||||
|
return IsAlive;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Equals
|
#region Equals
|
||||||
|
Loading…
Reference in New Issue
Block a user