-system name getter
-added error checking for event handling in registerSystem -now only valid handleEvent() functions are taken by system during register
This commit is contained in:
parent
f27e4c30ad
commit
dfdb56d501
3 changed files with 43 additions and 17 deletions
|
|
@ -376,6 +376,11 @@ struct TestSystem2
|
|||
//TestComp* tt;
|
||||
}
|
||||
|
||||
void handleEvent(EventInput input)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void handleEvent(EventInput input, ref TestEvent event)
|
||||
{
|
||||
input.test.bg = event.a;
|
||||
|
|
@ -571,9 +576,11 @@ int main()
|
|||
//foreach(j; 0..1_000)gEM.addEntity(tmpl);
|
||||
|
||||
gEM.beginRegister();
|
||||
//gEM.registerSystem!TestSystem2(0);
|
||||
gEM.registerSystem!TestSystem2(0);
|
||||
gEM.endRegister();
|
||||
|
||||
System* sys = EntityManager.instance.getSystem(TestSystem2.system_id);
|
||||
|
||||
//gEM.generateDependencies();
|
||||
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+24)) == EntityID(1,1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue