Andengine for Entity Entities Update handler and entity modifiers, Registerupdatehandler and Registerentitymodifier methods
The internal implementation of this method is to add the iupdatehandler,ientitymodifier that will be registered to the Updatehandlerlist,entitymodifierlist,
While Updatehandlerlist,entitymodifierlist are ArrayList subclasses, the addition of the ArrayList method does not control whether the added variable exists in the list and is added directly to the list
So when we register the Iupdatehandler,ientitymodifier object with the entity, we should not register the same object
For example, every time we get a genie from the sprite pool, we register a Ientitymodifier object for her, but there is no anti-registration of the Ientitymodifier object or Clearentitymodifiers when retrieving the sprite. So that the genie may have more than one modifier, in the Onmanagedupdate function will be called many times those same iupdatehandler or Ientitymodifier objects, which will affect the efficiency, so we can in the Recovery wizard when the anti-registration or clear , you can also check when registering the Iupdatehandler,ientitymodifier object, the Getentitymodifiercount () method will return the number of modifiers in the Entitymodifierlist list.
The Iupdatehandler,ientitymodifier of Andengine