C4 Engine
C4 Engine API Documentation

class AnimateSprocket

Defined in:  C4Sprockets.h
The AnimateSprocket class causes an image widget's texture coordinates to animate through a grid.
Definition

class AnimateSprocket final : public Sprocket

Constructor

AnimateSprocket(const Integer2D& count, int32 total, float rate);

Parameters
count The number of grid cells in the texture map horizontally and vertically.
total The total number of grid cells that contain animation frames.
rate The animation rate, in frames per millisecond.
Description
The AnimateSprocket class plays a sequence of frames from a texture map in an image widget. The count parameter specifies how many equal-sized grid cells exist in the texture map, and the total parameter specifies the total number of grid cells that should be used in the animation, starting at the upper-left corner and proceeding to the right through each row and downward through the rows.
Base Classes
Sprocket A AnimateSprocket is a specific type of sprocket.