Last active
August 29, 2015 14:00
-
-
Save codepaladin/11145921 to your computer and use it in GitHub Desktop.
Jumper - Draw Start and End
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
-- draw start position by using the pixel coordinates | |
-- set the startx and starty grid coordinates | |
function drawStart(xyPixelCoordinate, xyGridCoordinate) | |
local myText = display.newText( "A", xyPixelCoordinate.x, xyPixelCoordinate.y, native.systemFont, 34 ) | |
myText:setFillColor( 255, 255, 255 ) | |
startx = xyGridCoordinate.x | |
starty = xyGridCoordinate.y | |
end | |
-- draw end position by using the pixel coordinates | |
-- set the endx and endy grid coordinates | |
function drawEnd(xyPixelCoordinate, xyGridCoordinate) | |
local myText = display.newText( "B", xyPixelCoordinate.x, xyPixelCoordinate.y, native.systemFont, 34 ) | |
myText:setFillColor(255, 255, 255 ) | |
endx = xyGridCoordinate.x | |
endy = xyGridCoordinate.y | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment