Last active
August 29, 2015 14:01
-
-
Save codepaladin/4035d4415e2f1cec82b5 to your computer and use it in GitHub Desktop.
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
-- get start position based off of startX and startY grid (cartesian) coordinates | |
function drawStart() | |
local x = (display.contentWidth * 0.5 + ((startX - startY) * tileHeight)) | |
local y = (((startX + startY)/2) * tileHeight) - (tileHeight/2) | |
local myText = display.newText( "A", x, y, native.systemFont, 34 ) | |
end | |
-- get end position based off of endX and endY grid (cartesian) coordinates | |
function drawEnd() | |
local x = (display.contentWidth * 0.5 + ((endX - endY) * tileHeight)) | |
local y = (((endX + endY)/2) * tileHeight) - (tileHeight/2) | |
local myText = display.newText( "B", x, y, native.systemFont, 34 ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment