- Implementat el teleport desde l'habitació secreta ;)
This commit is contained in:
5
game.lua
5
game.lua
@@ -29,7 +29,7 @@ end
|
|||||||
function playsnd(sound,volume)
|
function playsnd(sound,volume)
|
||||||
if not mute then
|
if not mute then
|
||||||
--print(sound)
|
--print(sound)
|
||||||
playsound(sound,volume)
|
return playsound(sound,volume)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -115,6 +115,9 @@ function game_init(menu)
|
|||||||
table.insert(actors,trigger.new(56,32,32,triggers.escena_abad_porta_batman))
|
table.insert(actors,trigger.new(56,32,32,triggers.escena_abad_porta_batman))
|
||||||
|
|
||||||
table.insert(actors,trigger.new(19,32,32,triggers.escena_habitacio_batman))
|
table.insert(actors,trigger.new(19,32,32,triggers.escena_habitacio_batman))
|
||||||
|
|
||||||
|
table.insert(actors,trigger.new(14,40,32,triggers.teleport_a))
|
||||||
|
table.insert(actors,trigger.new(67,8,32,triggers.teleport_b))
|
||||||
score.create()
|
score.create()
|
||||||
|
|
||||||
cameras[0]=gps
|
cameras[0]=gps
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ function start_scene(scene,offset)
|
|||||||
scenes.die=scenes.current_scene[scenes.dnum].die or 0
|
scenes.die=scenes.current_scene[scenes.dnum].die or 0
|
||||||
if scene[1].musica then
|
if scene[1].musica then
|
||||||
--print(scene[1].musica)
|
--print(scene[1].musica)
|
||||||
playmus(scenes.current_scene[scenes.dnum].musica, 64)
|
playmus(scenes.current_scene[scenes.dnum].musica)
|
||||||
end
|
end
|
||||||
if offset then scenes.offset=offset end
|
if offset then scenes.offset=offset end
|
||||||
old_update=_update
|
old_update=_update
|
||||||
|
|||||||
19
trigger.lua
19
trigger.lua
@@ -68,3 +68,22 @@ function triggers:escena_habitacio_batman()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function triggers:teleport_a()
|
||||||
|
abad.teleport=true
|
||||||
|
playsnd(audio_hit)
|
||||||
|
cls(14)
|
||||||
|
imp.reset()
|
||||||
|
abad.hab=67
|
||||||
|
abad.x=24
|
||||||
|
end
|
||||||
|
|
||||||
|
function triggers:teleport_b()
|
||||||
|
if abad.teleport then
|
||||||
|
playsnd(audio_hit)
|
||||||
|
cls(14)
|
||||||
|
imp.reset()
|
||||||
|
abad.hab=14
|
||||||
|
abad.x=16
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user