-add ecsID template function (get Component/System/Event ID, passes tests)
-removed some ECS mixins code
This commit is contained in:
parent
13c82acad4
commit
a926b79223
9 changed files with 138 additions and 123 deletions
|
|
@ -2,6 +2,18 @@ module bubel.ecs.traits;
|
|||
|
||||
import std.traits;
|
||||
|
||||
ref ushort ecsID(T)()
|
||||
{
|
||||
__gshared ushort id = ushort.max;
|
||||
return id;
|
||||
}
|
||||
|
||||
ref ushort ecsID(T)(T obj)
|
||||
{
|
||||
static if(isPointer!T)return ecsID!(PointerTarget!T);
|
||||
else return ecsID!T;
|
||||
}
|
||||
|
||||
bool isForeachDelegateWithTypes(DG, Types...)()
|
||||
{
|
||||
return is(DG == delegate) && is(ReturnType!DG == int) && is(Parameters!DG == Types);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue