I could use a few deva to make some art. I could also use a guy who knows how to tilt 2d safley without messing up the game art. Hope you like it!
--Flight School
--Hi!
function setup()
displayMode(STANDARD)
print("Tap help to learn how to fly.")
print("Tap close to start flying.")
print("Sorry the plane is a little small.")
parameter.action("Close", function() closing() end)
parameter.action("Help", function() Help() end)
supportedOrientations(LANDSCAPE_ANY)
player = vec2(150,300)
full = false
throttle = 0
end
function draw()
background(0, 0, 255, 255)
fill(0, 255, 36, 255)
rect(0, 0, 1000, 200)
if full == true then
fill(128, 79, 30, 255)
rect(100, 100, 100, 200)
speed = throttle * 2
sprite("Documents:plane", player.x, player.y)
fill(127, 127, 127, 255)
rect(400, 500, 100, 100)
player.x = player.x + speed
if CurrentTouch.x >=0 and CurrentTouch.y >=700 and CurrentTouch.state == MOVING then
player.y = player.y - 2
end
if CurrentTouch.x >= 0 and CurrentTouch.y <=100 and CurrentTouch.state == MOVING then
player.y = player.y + 1
end
if CurrentTouch.x >=400 and CurrentTouch.x <= 500 and CurrentTouch.y >=500 and CurrentTouch.y <=600 and CurrentTouch.state == BEGAN then
throttle = throttle + 1
end
if throttle >= 2 then
throttle = throttle - 1
end
if player.x >=1000 then
throttle = throttle - 2
if throttle <=2 then
throttle = throttle + 1
end
end
if player.x <= 0 then
throttle = throttle + 2
if throttle >=2 then
throttle = throttle - 1
end
if player.x <= 0 and player.y <= 270 then
throttle = throttle - 5
if throttle <= 0 then
throttle = 0
background(240, 255, 0, 255)
fill(255, 0, 0, 255)
fontSize(50)
text("You landed safley!!! \
Press the restart button to fly again.", WIDTH/2, HEIGHT/2)
text(" | \
v", 100, 100)
end
end
end
end
end
function Help()
displayMode(STANDARD)
output.clear()
print("Tap and rub the bottom of the screen to climb.")
print("\
Tap and rub the top of the screen to decend.")
print("\
No left and right yet... But it will come soon.")
print("\
You switch directions be hitting the edge.")
print("\
If you are facing more degrees up than your speed, you will stall.")
print("Tap the grey box to increase throttle. (5 Taps is max)")
end
function closing()
full = true
displayMode(FULLSCREEN)
output.clear()
end