注明:
这里只针对玩家做修改而已,其他像事件接触,事件随机斜行,斜行对话等...
都还在开发中,以后有时间会更新修改脚本。
class Game_Character
#--------------------------------------------------------------------------
# ● 向左下移動
#--------------------------------------------------------------------------
def move_lower_left
unless @direction_fix
turn_down
end
# 下→左、左→下 的通道可以通行的情況下
if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or
(passable?(@x, @y, 4) and passable?(@x - 1, @y, 2))
# 更新座標
@x -= 1
@y += 1
# 增加步數
increase_steps
end
end
#--------------------------------------------------------------------------
# ● 向右下移動
#--------------------------------------------------------------------------
def move_lower_right
unless @direction_fix
turn_right
end
# 下→右、右→下 的通道可以通行的情況下
if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or
(passable?(@x, @y, 6) and passable?(@x + 1, @y, 2))
# 更新座標
@x += 1
@y += 1
# 增加步數
increase_steps
end
end
#--------------------------------------------------------------------------
# ● 向左上移動
#--------------------------------------------------------------------------
def move_upper_left
unless @direction_fix
turn_left
end
# 上→左、左→上 的通道可以通行的情況下
if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or
(passable?(@x, @y, 4) and passable?(@x - 1, @y, 8))
# 更新座標
@x -= 1
@y -= 1
# 增加步數
increase_steps
end
end
#--------------------------------------------------------------------------
# ● 向右上移動
#--------------------------------------------------------------------------
def move_upper_right
unless @direction_fix
turn_up
end
# 上→右、右→上 的通道可以通行的情況下
if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or
(passable?(@x, @y, 6) and passable?(@x + 1, @y, 8))
# 更新座標
@x += 1
@y -= 1
# 增加步數
increase_steps
end
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |