- [NEW] Més tiles
- [FIX] L'heroi se clavaba en les pareds quan li pegaven - [NEW] Alguns fondos enhancechats - [FIX] Augmentada la velocitat de Nemesio - [NEW] Shortcuts de teclat per a canviar de mode a l'editor - [NEW] Habitacions al 40%
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -52,19 +52,19 @@ function ia.update_hero()
|
|||||||
-- Si li han pegat...
|
-- Si li han pegat...
|
||||||
if sprites.hero.has_been_hit then
|
if sprites.hero.has_been_hit then
|
||||||
if sprites.hero.flipped then
|
if sprites.hero.flipped then
|
||||||
local tx, ty = (sprites.hero.pos.x+3)>>3, (sprites.hero.pos.y+16)>>3
|
local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3
|
||||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
||||||
if tx<rooms.pos.x then
|
if tx>rooms.pos.x+19 then
|
||||||
game.change_room(-1,0)
|
game.change_room(1,0)
|
||||||
else
|
else
|
||||||
sprites.hero.pos.x = sprites.hero.pos.x + 1
|
sprites.hero.pos.x = sprites.hero.pos.x + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3
|
local tx, ty = (sprites.hero.pos.x+3)>>3, (sprites.hero.pos.y+16)>>3
|
||||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
||||||
if tx>rooms.pos.x+19 then
|
if tx<rooms.pos.x then
|
||||||
game.change_room(1,0)
|
game.change_room(-1,0)
|
||||||
else
|
else
|
||||||
sprites.hero.pos.x = sprites.hero.pos.x - 1
|
sprites.hero.pos.x = sprites.hero.pos.x - 1
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ function ia.update_nemesio(spr)
|
|||||||
|
|
||||||
if spr.substate == nemesio.STATIC then
|
if spr.substate == nemesio.STATIC then
|
||||||
spr.mode = draw.NORMAL
|
spr.mode = draw.NORMAL
|
||||||
if spr.timer==100 then
|
if spr.timer==50 then
|
||||||
spr.timer=0
|
spr.timer=0
|
||||||
spr.substate = nemesio.FLOATING
|
spr.substate = nemesio.FLOATING
|
||||||
spr.advance = {x=0,y=0}
|
spr.advance = {x=0,y=0}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ editor = {
|
|||||||
item_dragged=nil,
|
item_dragged=nil,
|
||||||
dragged_start_pos=nil,
|
dragged_start_pos=nil,
|
||||||
flip=false,
|
flip=false,
|
||||||
|
msg=nil,
|
||||||
|
msg_timeout=0,
|
||||||
|
|
||||||
enable = function()
|
enable = function()
|
||||||
app.update = editor.update
|
app.update = editor.update
|
||||||
@@ -153,6 +155,18 @@ editor = {
|
|||||||
editor.play()
|
editor.play()
|
||||||
elseif key.press(key.F11) then
|
elseif key.press(key.F11) then
|
||||||
reload_textures()
|
reload_textures()
|
||||||
|
elseif key.press(key.N1) then
|
||||||
|
editor.layer=LAYER_FOREGROUND
|
||||||
|
editor.msg="FOREGROUND"
|
||||||
|
editor.msg_timeout = 20
|
||||||
|
elseif key.press(key.N2) then
|
||||||
|
editor.layer=LAYER_BACKGROUND
|
||||||
|
editor.msg="BACKGROUND"
|
||||||
|
editor.msg_timeout = 20
|
||||||
|
elseif key.press(key.N3) then
|
||||||
|
editor.layer=LAYER_ITEMS
|
||||||
|
editor.msg="ITEMS"
|
||||||
|
editor.msg_timeout = 20
|
||||||
end
|
end
|
||||||
|
|
||||||
if editor.layer==LAYER_ITEMS then
|
if editor.layer==LAYER_ITEMS then
|
||||||
@@ -181,8 +195,11 @@ editor = {
|
|||||||
draw.text(rooms.pos.x//20,1,96,28)
|
draw.text(rooms.pos.x//20,1,96,28)
|
||||||
draw.text(rooms.pos.y//13,5,96,28)
|
draw.text(rooms.pos.y//13,5,96,28)
|
||||||
|
|
||||||
-- Pintar el menú (el marcador serà en el modul game.lua)
|
if editor.msg_timeout > 0 then
|
||||||
--score.draw()
|
editor.msg_timeout = editor.msg_timeout - 1
|
||||||
|
draw.text(editor.msg, 10, 96, 8)
|
||||||
|
end
|
||||||
|
|
||||||
menu.draw()
|
menu.draw()
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|||||||