-added removeComponents() function (removing by ids array, or components types)

-sorting IDs in addComponents() and removeComponents()
This commit is contained in:
Mergul 2018-09-14 12:03:27 +02:00
parent 5b2a6e9890
commit a066a97f01
3 changed files with 118 additions and 21 deletions

View file

@ -263,6 +263,13 @@ int main()
writeln((cast(uint*) pp)[0 .. 14], " ", pp);
gEM.removeComponents!(TestComp)(entity.id);
pp = gEM.getEntity(entity.id);
gEM.update();
writeln((cast(uint*) pp)[0 .. 14], " ", pp);
//import std.stdio;
//writeln((cast(uint*)tmpl.info.first_block)[0..48]);
gEM.freeTemplate(tmpl);