so i wrote this with some help
local physics = require("physics")
physics.start()
physics.setGravity( 0, 10 )
--system.actvate( "multitouch" )
--physics.setDrawMode("debug")
--media.playSound( "13 300 Violin Orchestra.m4a" )
--local stopAfter200Seconds = function()
--media.stopSound()
--end
--timer.performWithDelay( 10000, stopAfter200Seconds )
display.setStatusBar( display.HiddenStatusBar )
local background = display.newImage("nuclear\_iphone\_wallpapers.png")
local can = display.newImage("can.png")
can.x = display.contentWidth/2
physics.addBody(can, { bounce = 0.3, friction = 1.0 })
local can2 = display.newImage("can.png")
can2.x = can.x - 105
physics.addBody(can2, { bounce = 0.3, friction = 1.0 })
local can3 = display.newImage("can.png")
can3.x = can.x +105
physics.addBody(can3, { bounce = 0.3, friction = 1.0 })
local leftWall = display.newRect(0, 0, 1, display.contentHeight )
local rightWall = display.newRect(display.contentWidth, 0, 1, display.contentHeight )
local ceiling = display.newRect(0, 0, display.contentWidth, 1 )
physics.addBody(leftWall, "static", { bounce = 0.1} )
physics.addBody(rightWall, "static", { bounce = 0.1} )
physics.addBody(ceiling, "static", { bounce = 0.1} )
local floor = display.newImage("floor.png")
floor.y = display.contentHeight - floor.stageHeight/2
physics.addBody(floor, "static", { bounce = 0.2, friction = 1.0})
function moveCan(event)
local can = event.target
can:applyLinearImpulse( 0, -0.1, event.x, event.y )
end
--local resutButton = display.newImage("Black\_Button1.png", 4, 10)
can:addEventListener("touch" , moveCan)
can2:addEventListener("touch" , moveCan)
can3:addEventListener("touch" , moveCan)
resetButton:addEventListener("touch", setup)
i would like to add a score for every time you touch one of the cans and also
i would like to add a timer that countdowns and stops when one of the cans hits the floor
also if there was a way to add some sort of a splash screen that would be nice
[import]uid: 17040 topic_id: 5905 reply_id: 305905[/import]