Created
May 26, 2014 19:13
-
-
Save codepaladin/8dc3511c2c5b6b4044ad 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
-- include the jumper library | |
local Grid = require ("jumper.jumper.grid") | |
local Pathfinder = require ("jumper.jumper.pathfinder") | |
local walkable = 0 -- used by Jumper to mark obstacles | |
local map = {} -- table representing each grid position | |
local startX = 1 -- start x grid (cartesian) coordinate | |
local startY = 1 -- start y grid (cartesian) coordinate | |
local endX = 3 -- end x grid (cartesian) coordinate | |
local endY = 4 -- end y grid (cartesian) coordinate | |
local tileWidth = 128 | |
local tileHeight = 64 | |
local bg = display.newRect( display.screenOriginX, | |
display.screenOriginY, | |
display.actualContentWidth, | |
display.actualContentHeight) | |
bg.x = display.contentCenterX | |
bg.y = display.contentCenterY | |
bg:setFillColor( 000/255, 168/255, 254/255 ) | |
-- display group that will hold grid | |
group = display.newGroup( ) | |
group.x = display.contentCenterX -- center the grid on the screen |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment