Entities in Query
Entities in Query, how to handle entities in queries correctly and what to bear in mind.
Create in Query
world.Query(queryDesc, (ref DwarfSpawner spawner) => {
if(!spawner.CanSpawnDwarf()) return;
world.Create<Dwarf, Position, Velocity>();
});Modify in Query
world.Query(queryDesc, (ref Dwarf dwarf) => {
dwarf.Health++; // healing the dwarf
});Delete in Query
Why is that?
Last updated