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
{ | |
"sheet_bat": { | |
"class": ",imagesheet,", | |
"path": "images/bat.png", | |
"options": { | |
"width": 32, "height": 48, "numFrames": 12, | |
"sheetContentWidth": 192, "sheetContentHeight": 96 | |
} | |
}, | |
"background_mountain": { |
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
Ellipse = { | |
--declare constants | |
format='%d %d %d %d ', | |
class=',Ellipse,class,' | |
} | |
function Ellipse:tostring() | |
return string.format(self.format,self.x,self.y,self.width,self.height) | |
end --tostring | |
function Ellipse:new(centerX, centerY, wide, tall) | |
assert(wide>=0 and tall>=0) |
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
[email protected] | |
--M.I.T. license | |
physics=require ("physics") | |
physics.start() | |
physics.setGravity(0,0) | |
local noObject = true | |
local function create() | |
local vertices = { 0,-110, 27,-35, 105,-35, 43,16, 65,90, 0,45, -65,90, -43,15, -105,-35, -27,-35 } | |
local r, g, b = math.random(),math.random(),math.random() | |
local o = display.newPolygon( 0, 0, vertices ) |