- creat el object "scene", ja funcional
This commit is contained in:
@@ -3,9 +3,12 @@ game={
|
||||
|
||||
init=function()
|
||||
mapa.load("test.map")
|
||||
actors.add({name="usufondo",x=11,y=9,o="r",gfx={x=0,y=0},path={pos=0,route='rrrruro'}})
|
||||
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}})
|
||||
update=game.update
|
||||
|
||||
scene.start({function() actors.search("usufondo").path={pos=0,route='rrrruro'} end,
|
||||
function() balloon.show("HOLA\nQUE TAL?","usufondo",true) end })
|
||||
end,
|
||||
|
||||
update=function()
|
||||
@@ -23,9 +26,7 @@ game={
|
||||
actors.draw()
|
||||
camera(0,0)
|
||||
|
||||
balloon.show("HOLA\nQUE TAL?", "usufondo",true)
|
||||
|
||||
if hero and not hero.path and hero.dx+hero.dy==0 then
|
||||
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'}
|
||||
elseif btn(KEY_UP) then
|
||||
|
||||
Reference in New Issue
Block a user