Torna a funcionar el entrar dins d'un tile que es mig quan es bota
This commit is contained in:
@@ -211,8 +211,8 @@ function abad_jump()
|
||||
else
|
||||
local tile1_hit = arc_get_tile(x1_check, y_check )
|
||||
local tile2_hit = arc_get_tile(x2_check, y_check)
|
||||
local half_block1 = mapa_is_half_block_tile(tile1_hit)
|
||||
local half_block2 = mapa_is_half_block_tile(tile2_hit)
|
||||
local half_block1 = mapa_is_half_block_tile(map_to_editor_tile(tile1_hit))
|
||||
local half_block2 = mapa_is_half_block_tile(map_to_editor_tile(tile2_hit))
|
||||
local full_block1 = tile1_hit_type == tiletype.block and not half_block1
|
||||
local full_block2 = tile2_hit_type == tiletype.block and not half_block2
|
||||
local full_block = full_block1 and full_block2
|
||||
@@ -232,7 +232,8 @@ function abad_jump()
|
||||
-- permetre continuar en el salt
|
||||
if not full_block and half_block then
|
||||
if abad.jump_in_half_block==0 and not abad.jump_in_half_block_used then
|
||||
abad.jump_in_half_block = arcade_config.tiles_height>>1
|
||||
abad.jump_in_half_block = arcade_config.tiles_height / 2
|
||||
-- print(abad.jump_in_half_block)
|
||||
end
|
||||
if abad.jump_in_half_block>0 then
|
||||
abad.y=abad.y-vspace
|
||||
@@ -263,7 +264,8 @@ function abad_land ()
|
||||
|
||||
if can_land then
|
||||
abad.jump_in_half_block_used = false
|
||||
abad.jump_height = 0
|
||||
abad.jump_height = 0
|
||||
print("LANDED")
|
||||
end
|
||||
|
||||
return can_land
|
||||
|
||||
Reference in New Issue
Block a user