Object-SpritesetFrame
From Spheriki
A SpritesetFrame is an image-delay pair in a direction animation. It forms part of the Sphere SpritesetDirection object, which in turn forms part of the Sphere Spriteset.
Contents |
Initializers
None. It comes in the form of the frames array of the SpritesetDirection object.
Methods
None.
Members
- index Number, non-negative. The numeric index of which image this frame refers to within the parent Spriteset object's
imagesarray. - delay Number, positive. The number of frames that should pass before whatever is drawing the spriteset direction animation moves to the next frame in sequence. The order of that sequence is determined by the parent SpritesetDirection's
framesarray.
Examples
See examples for the Sphere Spriteset object.
Notes
- For clarity:
indexsays "which image", anddelaysays "how long until the next frame".
- Manipulating spritesets is often a stumbling block for users of Sphere. This is one of four other pieces of the spriteset system used by Sphere, three of which are used for animations (Spriteset and Image being the other two). See the base Spriteset page for information about how these pieces fit together.
-
delayis measured in frames. If the map engine that the spriteset is being shown in runs at 60 frames per second (FPS), adelayof 60 will show the frame for one second before moving to the next. Adelayof 30 will show the frame for half of a second.
See also
- Sphere Spriteset object
- Sphere Image object
- Sphere SpritesetBase object
- Sphere SpritesetDirection object