[NEW] Estructura de triggers ampliada per a soportar switchs
[NEW] Switchs convertits a triggers
This commit is contained in:
@@ -200,7 +200,7 @@ function abad_jump()
|
||||
local tile1_hit_type= arc_check_tile(x1_check, y_check )
|
||||
local tile2_hit_type= arc_check_tile(x2_check, y_check)
|
||||
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
|
||||
--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)
|
||||
-- local msg = "BLOCK TILE HITTED"
|
||||
@@ -208,17 +208,18 @@ function abad_jump()
|
||||
-- print(msg)
|
||||
-- Fer l'acció que correspon
|
||||
if not_block_tile then
|
||||
if switch_tile then
|
||||
local xx= x2_check
|
||||
local yy= y_check
|
||||
-- Executar el switch
|
||||
if tile1_hit_type == tiletype.switch then
|
||||
xx= x1_check
|
||||
end
|
||||
switches.start(xx, yy)
|
||||
else
|
||||
abad.y=abad.y-vspace
|
||||
end
|
||||
--if switch_tile then
|
||||
-- local xx= x2_check
|
||||
-- local yy= y_check
|
||||
-- -- Executar el switch
|
||||
-- if tile1_hit_type == tiletype.switch then
|
||||
-- xx= x1_check
|
||||
-- end
|
||||
-- switches.start(xx, yy)
|
||||
--else
|
||||
-- abad.y=abad.y-vspace
|
||||
--end
|
||||
abad.y=abad.y-vspace
|
||||
else
|
||||
local tile1_hit = arc_get_tile(x1_check, y_check )
|
||||
local tile2_hit = arc_get_tile(x2_check, y_check)
|
||||
|
||||
Reference in New Issue
Block a user