-change ecsID to becsID
-change component_id/system_id to becsID in demos
This commit is contained in:
parent
a926b79223
commit
a6d92cb21b
17 changed files with 296 additions and 272 deletions
|
|
@ -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...)()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue