- implementat actors.remove()
- FIX: El moviment per tecles residual no ha de influir en la escena
This commit is contained in:
@@ -4,7 +4,7 @@ game={
|
||||
init=function()
|
||||
flags={}
|
||||
mapa.load("test.map")
|
||||
actors.add({name="usufondo",x=11,y=9,o="r",gfx={x=0,y=0}})
|
||||
|
||||
actors.add({name="jailer",x=6,y=9,o="r",gfx={x=32,y=0}})
|
||||
actors.hero="jailer"
|
||||
|
||||
@@ -15,8 +15,13 @@ game={
|
||||
if not flags.usu1 then
|
||||
flags.usu1=true
|
||||
scene.start({
|
||||
function() actors.search("usufondo").path={pos=0,route='rrrruro'} end,
|
||||
function() balloon.show("HOLA\nQUE TAL?","usufondo",true) end,
|
||||
function() actors.add({name="usufondo",x=16,y=8,o="d",gfx={x=0,y=0}}) scene.cont() end,
|
||||
function() wait.start(1) end,
|
||||
function() actors.search("usufondo").path={pos=0,route='dlllll'} end,
|
||||
function() balloon.show("HOY NO HAY JAIL!\n800 MEGAS!!","usufondo",true) end,
|
||||
function() actors.search("usufondo").path={pos=0,route='rrrrru'} end,
|
||||
function() wait.start(0.5) end,
|
||||
function() actors.remove("usufondo") scene.cont() end,
|
||||
function() wait.start(1) end,
|
||||
function() balloon.show("PAYASO...","jailer",true) end
|
||||
})
|
||||
@@ -42,13 +47,13 @@ game={
|
||||
|
||||
if not scene.script and hero and not hero.path and hero.dx+hero.dy==0 then
|
||||
if btn(KEY_DOWN) then
|
||||
hero.path={pos=0,route='d'}
|
||||
hero.path={pos=0,route='d',keys=true}
|
||||
elseif btn(KEY_UP) then
|
||||
hero.path={pos=0,route='u'}
|
||||
hero.path={pos=0,route='u',keys=true}
|
||||
elseif btn(KEY_LEFT) then
|
||||
hero.path={pos=0,route='l'}
|
||||
hero.path={pos=0,route='l',keys=true}
|
||||
elseif btn(KEY_RIGHT) then
|
||||
hero.path={pos=0,route='r'}
|
||||
hero.path={pos=0,route='r',keys=true}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user