Created
June 24, 2014 20:22
-
-
Save codepaladin/b202d45864ba6a886cc6 to your computer and use it in GitHub Desktop.
Image Scaling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sheetInfo = require("knight") | |
local myImageSheet = graphics.newImageSheet( "knight.png", sheetInfo:getSheet()) | |
local sequenceData = | |
{ | |
name="rotate", | |
start=1, | |
count=8, | |
time=1000, | |
} | |
local character = display.newSprite( myImageSheet, sequenceData ) | |
character.x = display.contentCenterX | |
character.y = display.contentCenterY | |
-- this is here to make it easier to see what's going on. normally you wouldn't need this. | |
character:scale(2, 2) | |
character:setSequence( "rotate" ) | |
character:play() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment