-change ecsID to becsID

-change component_id/system_id to becsID in demos
This commit is contained in:
Mergul 2021-02-27 17:25:13 +01:00
parent a926b79223
commit a6d92cb21b
17 changed files with 296 additions and 272 deletions

View file

@ -2,16 +2,22 @@ module bubel.ecs.traits;
import std.traits;
ref ushort ecsID(T)()
/************************************************************************************************************************
Return Component/System/Event unique ID
*/
ref ushort becsID(T)()
{
__gshared ushort id = ushort.max;
return id;
}
ref ushort ecsID(T)(T obj)
/************************************************************************************************************************
Return Component/System/Event unique ID
*/
ref ushort becsID(T)(T obj)
{
static if(isPointer!T)return ecsID!(PointerTarget!T);
else return ecsID!T;
static if(isPointer!T)return becsID!(PointerTarget!T);
else return becsID!T;
}
bool isForeachDelegateWithTypes(DG, Types...)()