XST3 WEB spritesheet animation.

Example on how to flip a coin animation code.


winScreen(640, 480, 0);
setFps(60);

var sprite = new SpriteSheet('coin-sprite-animation-sprite-sheet.png', 44, 40);
var coin = new Animation(sprite, 3, 0, 9);
var x = getScreenWidth()/2;
var y = getScreenHeight()/2

function main() {
clear();
coin.update();
coin.draw(x, y);
}

Link here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s