Game Development Reference
In-Depth Information
Setting the frame of a sprite
The image_index variable holds the current frame number of an animation. The first
frame of an animation has an index of zero with the other frames counting up in order from
zero. An animation with 4 frames will have indexes from 0 to 3. The first frame will have
an index of 0, the second with an index of 1, the third with an index of 2, and the fourth
with an index of 3.
The following is the example code:
image_index=2;
Search WWH ::




Custom Search