-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpup.lua
More file actions
executable file
·29 lines (24 loc) · 889 Bytes
/
pup.lua
File metadata and controls
executable file
·29 lines (24 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function PUP_load()
PUP2 = 150*love.math.random(13,26)
PUP1 = 150*love.math.random(3,12)
caixa1=love.graphics.newImage("images/caixa1.jpg")
caixa2=love.graphics.newImage("images/caixa2.jpg")
end
function PUP_update(dt)
if PUP2 < (bolota_plataforma*180 + bolota_pos_x + px1 + 400) and (PUP2+50) >= (bolota_plataforma*180 + bolota_pos_x + px1 + 400) then
caixa1_plataforma = bolota_plataforma+11
camera.speed = 50
end
if bolota_plataforma == caixa1_plataforma then
camera.speed = (75+20*(fase-1))
end
if PUP1 < (bolota_plataforma*180 + bolota_pos_x + px1 + 400) and (PUP1+50) >= (bolota_plataforma*180 + bolota_pos_x + px1 + 400) then
for y=bolota_plataforma+2, bolota_plataforma+11, 1 do
z[y]= 7
end
end
end
function PUP_draw()
love.graphics.draw(caixa1, PUP1,300)
love.graphics.draw(caixa2, PUP2,300)
end