Object-SpritesetFrame

From Spheriki

Jump to: navigation, search

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 images array.
  • 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 frames array.


Examples

See examples for the Sphere Spriteset object.


Notes

  • For clarity: index says "which image", and delay says "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.
  • delay is measured in frames. If the map engine that the spriteset is being shown in runs at 60 frames per second (FPS), a delay of 60 will show the frame for one second before moving to the next. A delay of 30 will show the frame for half of a second.


See also

Personal tools