Closed SpotlightKid closed 8 years ago
Just a suggestion. I think it's more intuitive this way.
I've considered this. My initial thoughts were that when you delete an entity, it's truely gone. Components and Processors on the other hand, might be instanced before adding to the World. I probably should have changed this earlier, so I will merge your pull request. It's probably better to fix it now before many people use the library :)
The exception changes are looking very nice. The code is a lot cleaner as well. Thank you for your work on this.
The pairing of add/remove (components) vs create/delete (entities) seems more logical to me semantically.
Also do not suppress KeyError in
delete_entity
andremove_component
, which:delete/remove
calls in atry/except
.CachedWorld
simpler.