- segon teleport
- tecles debug llevades
This commit is contained in:
38
game.lua
38
game.lua
@@ -118,6 +118,8 @@ function game_init(menu)
|
|||||||
|
|
||||||
table.insert(actors,trigger.new(14,40,32,triggers.teleport_a))
|
table.insert(actors,trigger.new(14,40,32,triggers.teleport_a))
|
||||||
table.insert(actors,trigger.new(67,8,32,triggers.teleport_b))
|
table.insert(actors,trigger.new(67,8,32,triggers.teleport_b))
|
||||||
|
table.insert(actors,trigger.new(29,40,32,triggers.teleport_c))
|
||||||
|
table.insert(actors,trigger.new(61,8,32,triggers.teleport_d))
|
||||||
score.create()
|
score.create()
|
||||||
|
|
||||||
cameras[0]=gps
|
cameras[0]=gps
|
||||||
@@ -289,24 +291,24 @@ function update_game()
|
|||||||
fireball.update()
|
fireball.update()
|
||||||
switches.update()
|
switches.update()
|
||||||
|
|
||||||
local hx = abad.hab%10
|
--local hx = abad.hab%10
|
||||||
local hy = flr(abad.hab/10)
|
--local hy = flr(abad.hab/10)
|
||||||
if btnp(KEY_RETURN) then
|
--if btnp(KEY_RETURN) then
|
||||||
mode=modes.editing
|
-- mode=modes.editing
|
||||||
mapa_restore_backup()
|
-- mapa_restore_backup()
|
||||||
elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then
|
--elseif btn(KEY_LSHIFT) and btnp(KEY_RIGHT) and hx<9 then
|
||||||
abad.hab=abad.hab+1
|
-- abad.hab=abad.hab+1
|
||||||
elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then
|
--elseif btn(KEY_LSHIFT) and btnp(KEY_LEFT) and hx>0 then
|
||||||
abad.hab=abad.hab-1
|
-- abad.hab=abad.hab-1
|
||||||
elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then
|
--elseif btn(KEY_LSHIFT) and btnp(KEY_DOWN) and hy<7 then
|
||||||
abad.hab=abad.hab+10
|
-- abad.hab=abad.hab+10
|
||||||
elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then
|
--elseif btn(KEY_LSHIFT) and btnp(KEY_UP) and hy>0 then
|
||||||
abad.hab=abad.hab-10
|
-- abad.hab=abad.hab-10
|
||||||
elseif btnp(KEY_M) then
|
--elseif btnp(KEY_M) then
|
||||||
mute = not mute
|
-- mute = not mute
|
||||||
elseif btnp(KEY_ESCAPE) then
|
--elseif btnp(KEY_ESCAPE) then
|
||||||
pause()
|
-- pause()
|
||||||
end
|
--end
|
||||||
if abad.objects.gps~=nil then
|
if abad.objects.gps~=nil then
|
||||||
if btnp(KEY_1) then
|
if btnp(KEY_1) then
|
||||||
if abad.objects.gorro==nil and abad.objects.clau_premiere==nil then current_camera=1 end
|
if abad.objects.gorro==nil and abad.objects.clau_premiere==nil then current_camera=1 end
|
||||||
|
|||||||
19
trigger.lua
19
trigger.lua
@@ -87,3 +87,22 @@ function triggers:teleport_b()
|
|||||||
abad.x=16
|
abad.x=16
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function triggers:teleport_c()
|
||||||
|
abad.teleport2=true
|
||||||
|
playsnd(audio_hit)
|
||||||
|
cls(14)
|
||||||
|
imp.reset()
|
||||||
|
abad.hab=61
|
||||||
|
abad.x=24
|
||||||
|
end
|
||||||
|
|
||||||
|
function triggers:teleport_d()
|
||||||
|
if abad.teleport2 then
|
||||||
|
playsnd(audio_hit)
|
||||||
|
cls(14)
|
||||||
|
imp.reset()
|
||||||
|
abad.hab=29
|
||||||
|
abad.x=24
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user