- [FIX] La rata no pasaba per un hueco de 8 pixels de alt
- [FIX] Al tornar de l'editor, resetejar hero.invisible - [NEW] Habitacions al 38%
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -267,6 +267,7 @@ end
|
||||
|
||||
function ia.hero_reset()
|
||||
sprites.hero.state = templates.ALIVE
|
||||
sprites.hero.invisible = nil
|
||||
sprites.hero.lives = 4
|
||||
sprites.hero.surf = surf.load("gfx/morcus.gif")
|
||||
sprites.hero.animation = "hero_stand"
|
||||
|
||||
@@ -13,14 +13,14 @@ function ia.update_rata(spr)
|
||||
|
||||
if spr.flipped then
|
||||
local tx, ty = (spr.pos.x-1)>>3, (spr.pos.y+7)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x - 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
else
|
||||
local tx, ty = (spr.pos.x+9)>>3, (spr.pos.y+7)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x + 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
|
||||
Reference in New Issue
Block a user