-removed 'InputStruct' version switch (now it's default behaviour)

-checking if System struct has valid update(EntitiesData) prototype
This commit is contained in:
Mergul 2018-10-01 13:17:31 +02:00
parent d5780a6252
commit 0e13fafefd
3 changed files with 172 additions and 363 deletions

View file

@ -176,18 +176,9 @@ int main()
}
void update(ref Entity entity, ref TestComp test) //ref TestComp comp)
void update(ref EntitiesData data)
{
assert(cast(size_t)&test % TestComp.alignof == 0);
//writeln("High priority tekst! ");
}
void update(ref EntitiesData data) //ref TestComp comp)
{
assert(cast(size_t)&data.test % TestComp.alignof == 0);
//writeln("High priority tekst! ");
}
/*void handleEvent(Event event, ref TestComp comp)
@ -204,11 +195,6 @@ int main()
{
Entity[] entity;
TestComp3[] test;
/*void a()
{
}*/
}
void onEnable()
@ -230,16 +216,8 @@ int main()
}
void update(ref Entity entity, ref TestComp3 test) //ref TestComp comp)
void update(ref EntitiesData data)
{
//writeln("TestSystem2 update");
test.gg += 14;
gEM.sendSelfEvent!(TestEvent)(entity.id, TestEvent());
}
void update(ref EntitiesData data) //ref TestComp comp)
{
//writeln("TestSystem2 update");
foreach(i;0..data.test.length)
{
data.test[i].gg += 14;