SpriteFactory.Sprite.UpdateSprite
C#: void UpdateSprite ()
JS: function UpdateSprite () : void
Description
The main Sprite update function that updates animation.
In order for Sprites to animate, the UpdateSprite function must be called. There are 3 ways to drive animation:
- Set selfUpdate = True on the Sprite and it will run UpdateSprite in the Update function every frame.
- Create a SpriteUpdater in the scene and assign the Sprite to it. The SpriteUpdater will update the Sprite in the specified update cycle.
- Create a custom script and call Sprite.UpdateSprite() manually.
Take care to update Sprites using only one of the three methods at any time or the Sprite will update multiple times per frame causing problems with speed and timing.
See Also
selfUpdate
SpriteUpdater