Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] FPS control in animation?

Hi,

When displaying multiple animated images (e.g. sprites) on the screen, how can I precisely control the fps of each sprite to have them run in an individual way? e.g. I want to set a gear sprite to spin faster but the same gear image runs slower, e.g.

// I have a Sprite class
fps1 = 10;
Sprite gear1 = new Sprite(gearImageData, fps1);
fps2 = 5;
Sprite gear1 = new Sprite(gearImageData, fps2);

Is there any similiar engine available?

Thanks,

Regards,
Yu



Back to the top