- Implementat el segon layer

- Implementat resizar el mapa
This commit is contained in:
2023-02-02 18:54:40 +01:00
parent 1f4274f278
commit 5091fe267b
6 changed files with 143 additions and 5 deletions

View File

@@ -4,8 +4,8 @@ game={
restart=function()
flags={}
objects.list={}
actors.main={name="jailer",x=6,y=9,o="r",gfx={x=32,y=0},level="test"}
game.init("test")
actors.main={name="jailer",x=6,y=9,o="r",gfx={x=32,y=0},level="jail"}
game.init("jail")
end,
init=function(levelname,f,objs)
@@ -133,9 +133,16 @@ game={
end
camera(game.cam.x, game.cam.y)
setsource(tiles)
setmap(mapa.surface)
map(0,0,0,0,mapa.w, mapa.h)
setsource(sprites)
actors.draw()
if mapa.front_layer then
setsource(tiles)
setmap(mapa.front_layer)
map(0,0,0,0,mapa.w, mapa.h)
end
setmap(mapa.surface)
camera(0,0)
if not scene.script and hero and not hero.path and hero.dx+hero.dy==0 then