World.update_views and World.add_entity are performing logic that should likely be moved into the EntityManager instance. Examine the whole chain of modification notices and find a better way to implement them all.
Entity.add/rem_component calls World.update_views(self) only if it's been added to the world
Presence in the World is denoted by Entity.in_world?
In World.add_entity(), we call Entity#in_world=(true)
World.update_views(entity) adds entity to a array to be processed before the next update
World.update() calls EntityManager::View.update!(entity) for each entity before calling systems
World.update_views
andWorld.add_entity
are performing logic that should likely be moved into theEntityManager
instance. Examine the whole chain of modification notices and find a better way to implement them all.Entity.add/rem_component
callsWorld.update_views(self)
only if it's been added to the worldEntity.in_world?
World.add_entity()
, we callEntity#in_world=(true)
World.update_views(entity)
addsentity
to a array to be processed before the nextupdate
World.update()
callsEntityManager::View.update!(entity)
for each entity before calling systemsAll of this cross-class talk is dumb.