-
Notifications
You must be signed in to change notification settings - Fork 22
ComponentUpdateSystem
Adam Martin edited this page May 12, 2015
·
1 revision
This system is used to queue (not the data structure) up component changes (updates or removals) during the next update cycle. The update cycle happens when it is safe to update the central component storage without the need to provide any type of lock.
-
ComponentUpdateSystem<TYPE>::Initialize()
- this method must be called for each type of component. This setups the update function that gets called fromComponentUpdateSystemList
each update cycle. This must only be called once per component type to prevent useless update calls. -
ComponentUpdateSystem<TYPE>::UpdateTo(frame_id)
- applies all update_lists up to and including frame_id from future_update_lists. -
ComponentUpdateSystem<TYPE>::SubmitUpdate(entity_id, value, frame_id = 0)
- submits an update tovalue
to occur for the specified component type belonging toentity_id
onframe_id
. Ifframe_id
= 0 then the update will be placed in the newest frame_id. -
ComponentUpdateSystem<TYPE>::SubmitRemoval(entity_id, frame_id = 0)
- submits an removal to occur for the specified component type belonging toentity_id
onframe_id
. Ifframe_id
= 0 then the update will be placed in the newest frame_id.