-removed UpdateBySystems version switch (it's now default behaviour)
-beginRegister() and endRegister() was added (every register functions must be called between this calls, update calls can't be called there) -SystemCallers and Systems dependecies is rebuild always in endRegister(); -beginRegister() clear all SystemCallers and Systems dependencies -possibility to get System ID and execution state -JobGroup has now pointer to it's parent (SystemCaller) -SystemCaller clean up destructor
This commit is contained in:
parent
f666dfd1d5
commit
16a5696840
4 changed files with 143 additions and 165 deletions
|
|
@ -285,6 +285,7 @@ import std.meta;
|
|||
gEM.setJobDispachFunc(&dispatch);
|
||||
assert(gEM !is null);
|
||||
|
||||
gEM.beginRegister();
|
||||
gEM.registerPass("fixed");
|
||||
|
||||
MonoTime time = MonoTime.currTime;
|
||||
|
|
@ -306,6 +307,7 @@ import std.meta;
|
|||
gEM.registerSystem!TestSystem(0);
|
||||
//gEM.registerSystem!TestSystemWithHighPriority(100);
|
||||
//gEM.registerSystem!TestSystem2(0);
|
||||
gEM.endRegister();
|
||||
|
||||
dur = (MonoTime.currTime - time).total!"usecs";
|
||||
writeln("Systems register: ", dur, " usecs");
|
||||
|
|
@ -368,9 +370,11 @@ import std.meta;
|
|||
|
||||
//foreach(j; 0..1_000)gEM.addEntity(tmpl);
|
||||
|
||||
gEM.beginRegister();
|
||||
gEM.registerSystem!TestSystem2(0);
|
||||
gEM.endRegister();
|
||||
|
||||
gEM.generateDependencies();
|
||||
//gEM.generateDependencies();
|
||||
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+24)) == EntityID(1,1));
|
||||
//assert(*(cast(EntityID*)(cast(void*)tmpl.info.first_block+48)) == EntityID(1,1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue