Skip to content

Instantly share code, notes, and snippets.

@codepaladin
Created June 24, 2014 20:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codepaladin/b202d45864ba6a886cc6 to your computer and use it in GitHub Desktop.
Save codepaladin/b202d45864ba6a886cc6 to your computer and use it in GitHub Desktop.
Image Scaling
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