- Sistema d'objectes funcionant
This commit is contained in:
@@ -6,9 +6,11 @@ game={
|
||||
mapa.load("test.map")
|
||||
|
||||
actors.add({name="jailer",x=6,y=9,o="r",gfx={x=32,y=0}})
|
||||
actors.add({name="estudiant",x=12,y=8,o="d",gfx={x=64,y=0}})
|
||||
actors.hero="jailer"
|
||||
|
||||
update=game.update
|
||||
--objects.collect({name="diskette",x=0,y=0})
|
||||
|
||||
switches.add({x=8,y=8,w=1,h=3,action=
|
||||
function()
|
||||
@@ -18,12 +20,13 @@ game={
|
||||
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!\nTU MISMO!!","usufondo",false,{x=7,w=10,h=2}) end,
|
||||
function() balloon.show("HOY NO HAY JAIL!\nTU MISMO!!",10,"usufondo",false,{x=7,w=10,h=2}) end,
|
||||
function() objects.collect({name="DISQUITO DE USUFONDO",x=0,y=0}) 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("IMBÈSIL...","jailer",true,{x=5,w=7,h=1}) end
|
||||
function() balloon.show("IMBÈSIL...",2,"jailer",true,{x=5,w=7,h=1}) end
|
||||
})
|
||||
end
|
||||
end
|
||||
@@ -78,14 +81,18 @@ game={
|
||||
|
||||
pause=function()
|
||||
game.paused = true
|
||||
rectfill(10,84, 150, 128,6)
|
||||
rect(10,84, 150, 128,8)
|
||||
rect(9,83, 151, 129,6)
|
||||
rectfill(9,84, 150, 128,6)
|
||||
rect(9,84, 150, 128,8)
|
||||
rect(8,83, 151, 129,6)
|
||||
text("OBJECTES:",14,82,8)
|
||||
setsource(objectes)
|
||||
sspr(0,0,16,16,14,89)
|
||||
sspr(0,0,16,16,34,89)
|
||||
sspr(0,0,16,16,14,109)
|
||||
|
||||
local x,y=15,90
|
||||
for k,v in pairs(objects.list) do
|
||||
sspr(v.x,v.y,16,16,x,y)
|
||||
x=x+19
|
||||
if x==148 then x,y=15,y+19 end
|
||||
end
|
||||
end,
|
||||
|
||||
resume=function()
|
||||
|
||||
Reference in New Issue
Block a user