- cls() per a quan no hi ha mapa
- Scroll restringit - Treballant en les jails - Mes gràfics
This commit is contained in:
@@ -103,10 +103,13 @@ game={
|
||||
local hero = actors.search("jailer")
|
||||
if hero then
|
||||
game.cam.x = hero.x*8 + hero.dx*2 - 80
|
||||
if game.cam.x+160 > mapa.w*8 then game.cam.x = mapa.w*8-160 end
|
||||
if game.cam.x < 0 then game.cam.x=0 end
|
||||
game.cam.y = hero.y*8 + hero.dy*2 - 72
|
||||
if game.cam.y+144 > mapa.h*8 then game.cam.y = mapa.h*8-144 end
|
||||
if game.cam.y < 0 then game.cam.y=0 end
|
||||
end
|
||||
cls(6)
|
||||
camera(game.cam.x, game.cam.y)
|
||||
setsource(tiles)
|
||||
setmap(mapa.surface)
|
||||
@@ -120,7 +123,7 @@ game={
|
||||
end
|
||||
setmap(mapa.surface)
|
||||
camera(0,0)
|
||||
|
||||
text(tostring(game.cam.x)..","..tostring(game.cam.y),1,1,8)
|
||||
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',keys=true}
|
||||
|
||||
Reference in New Issue
Block a user