[FIX] Incidencia #9 resolta
This commit is contained in:
@@ -118,7 +118,7 @@ function abad:draw()
|
||||
abad.respawning=abad.respawning-1
|
||||
end
|
||||
|
||||
-- draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3)
|
||||
draw.rect(x+abad.bb.x,y+abad.bb.y,abad.bb.w,abad.bb.h,3)
|
||||
end
|
||||
|
||||
function abad_make_safe( force )
|
||||
@@ -203,7 +203,7 @@ function abad_jump()
|
||||
local not_block_tile = tile1_hit_type ~= tiletype.block and tile2_hit_type ~= tiletype.block
|
||||
-- local switch_tile = tile1_hit_type == tiletype.switch or tile2_hit_type == tiletype.switch
|
||||
-- print("JUMP > "..x1_check..", "..x2_check..", "..y_check)
|
||||
-- print("T1= "..tile1_hit_type.." / T2= "..tile2_hit_type)
|
||||
-- print("T1= "..tile1_hit_type.." / T2= "..tile2_hit_type.." / SW= "..tiletype.switch)
|
||||
-- local msg = "BLOCK TILE HITTED"
|
||||
-- if not_block_tile then msg="not block" end
|
||||
-- print(msg)
|
||||
|
||||
@@ -33,10 +33,10 @@ function table_key (tabla, valor)
|
||||
end
|
||||
|
||||
function collision(a, b)
|
||||
return (a.x+a.bb.x+a.bb.w >= b.x+b.bb.x)
|
||||
and (a.x+a.bb.x <= b.x+b.bb.x+b.bb.w)
|
||||
and (a.y+a.bb.y+a.bb.h >= b.y+b.bb.y)
|
||||
and (a.y+a.bb.y <= b.y+b.bb.y+b.bb.h)
|
||||
return (a.x+a.bb.x+a.bb.w > b.x+b.bb.x)
|
||||
and (a.x+a.bb.x < b.x+b.bb.x+b.bb.w)
|
||||
and (a.y+a.bb.y+a.bb.h > b.y+b.bb.y)
|
||||
and (a.y+a.bb.y < b.y+b.bb.y+b.bb.h)
|
||||
end
|
||||
|
||||
function half_collision(a, b)
|
||||
|
||||
@@ -153,7 +153,8 @@ function arc_check_tile(world_x,world_y,debug)
|
||||
return tiletype.half, tile
|
||||
elseif tile<15 then
|
||||
return tiletype.stair, tile
|
||||
elseif tile==15 then
|
||||
-- 23 = Tile transparent, necesari per a dibuixar els switchos en la versió arcade
|
||||
elseif tile==23 then
|
||||
return tiletype.switch, tile
|
||||
elseif tile<64 then
|
||||
return tiletype.block, tile
|
||||
|
||||
@@ -58,7 +58,7 @@ function trigger:draw()
|
||||
end
|
||||
|
||||
-- debug rect
|
||||
-- draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3)
|
||||
draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3)
|
||||
end
|
||||
|
||||
--function trigger:do_touched()
|
||||
|
||||
Reference in New Issue
Block a user