[FIX] Modificat el mapa principal
[FIX] El abad ja entra i ix de les escales perfectament mentre no es diga lo contrari [FIX] Afegit nou tile
This commit is contained in:
+13
-20
@@ -429,8 +429,13 @@ function abad_state_normal()
|
||||
|
||||
abad_make_safe()
|
||||
|
||||
if controller:check("up") and abad_in_stairs() then
|
||||
abad.update=abad_state_stairs
|
||||
if controller:check("up") then
|
||||
if abad_in_stairs(0,-1) then
|
||||
abad.update=abad_state_stairs
|
||||
else
|
||||
abad.update=abad_state_normal
|
||||
abad.frame=0
|
||||
end
|
||||
elseif controller:check("down") then
|
||||
abad_move_down()
|
||||
elseif controller:check("right") then
|
||||
@@ -601,11 +606,7 @@ function abad_state_stairs()
|
||||
abad.frame=4
|
||||
abad.wait=abad.wait+1
|
||||
local moved = false
|
||||
|
||||
--local x1_check = abad.x+abad.bb.x
|
||||
--local x2_check = abad.x+abad.bb.x+abad.bb.w-1
|
||||
--local y_check = abad.y+abad.bb.h
|
||||
|
||||
|
||||
if controller:check("right") then
|
||||
abad.flip=false
|
||||
abad_advance()
|
||||
@@ -615,28 +616,20 @@ function abad_state_stairs()
|
||||
abad_advance()
|
||||
moved = true
|
||||
elseif controller:check("up") then
|
||||
--y_check = y_check - 1
|
||||
--if arc_check_tile(x1_check,y_check)==tiletype.stair and
|
||||
-- arc_check_tile(x2_check,y_check)==tiletype.stair then
|
||||
-- abad.y=abad.y-1
|
||||
-- if abad.wait==6 then sound.play(audio_low) end
|
||||
--end
|
||||
if abad_in_stairs(0,-1) then
|
||||
abad.y=abad.y-1
|
||||
moved = true
|
||||
else
|
||||
abad.update=abad_state_normal
|
||||
abad.frame=0
|
||||
end
|
||||
elseif controller:check("down") then
|
||||
-- y_check = y_check + 1
|
||||
-- if arc_check_tile(x1_check,y_check)==tiletype.stair and
|
||||
-- arc_check_tile(x2_check,y_check)==tiletype.stair then
|
||||
-- abad.y=abad.y+1
|
||||
-- if abad.wait==6 then sound.play(audio_low) end
|
||||
-- end
|
||||
if abad_in_stairs(0,1) and not abad_in_floor(0,0) then
|
||||
abad.y=abad.y+1
|
||||
moved = true
|
||||
else
|
||||
--abad.update=abad_state_normal
|
||||
abad.update=abad_state_normal
|
||||
abad.frame=0
|
||||
end
|
||||
end
|
||||
if moved and abad.wait==6 then sound.play(audio_low) end
|
||||
|
||||
Reference in New Issue
Block a user