-removed 'InputStruct' version switch (now it's default behaviour)
-checking if System struct has valid update(EntitiesData) prototype
This commit is contained in:
parent
d5780a6252
commit
0e13fafefd
3 changed files with 172 additions and 363 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue