-EntityAllocator fixed issue with not initialized block pointer
-deffered adding entities -deffered adding and removeing components
This commit is contained in:
parent
b3dce6560a
commit
cb0f56b0fb
3 changed files with 214 additions and 77 deletions
|
|
@ -120,7 +120,8 @@ int main()
|
|||
test2.a = 8;
|
||||
//writeln("Jakis tekst! ",test2.b);
|
||||
//writeln("Low priority tekst! ");
|
||||
if(test3)test3.gg = 200;
|
||||
if (test3)
|
||||
test3.gg = 200;
|
||||
}
|
||||
|
||||
void handleEvent(Event event, ref TestComp comp)
|
||||
|
|
@ -278,21 +279,23 @@ int main()
|
|||
gEM.addEntity(tmpl);
|
||||
|
||||
gEM.addComponents(entity.id, TestComp3());
|
||||
pp = gEM.getEntity(entity.id);
|
||||
|
||||
gEM.begin();
|
||||
gEM.update();
|
||||
gEM.end();
|
||||
|
||||
pp = gEM.getEntity(entity.id);
|
||||
|
||||
writeln((cast(uint*) pp)[0 .. 14], " ", pp);
|
||||
|
||||
gEM.removeComponents!(TestComp)(entity.id);
|
||||
pp = gEM.getEntity(entity.id);
|
||||
|
||||
gEM.begin();
|
||||
gEM.update();
|
||||
gEM.end();
|
||||
|
||||
pp = gEM.getEntity(entity.id);
|
||||
|
||||
writeln((cast(uint*) pp)[0 .. 14], " ", pp);
|
||||
|
||||
//import std.stdio;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue