本帖最后由 铅笔描绘的思念 于 2012-6-7 20:09 编辑
如果是事件的话。。。应该也是会想你做的一样
所以推荐用脚本 10行结束
class Game_Player < Game_Character def move_by_input case Input.dir8 when 2;move_diagonal(6,2) when 4;move_diagonal(4,2) when 6;move_diagonal(6,8) when 8;move_diagonal(4,8) end end end
class Game_Player < Game_Character
def move_by_input
case Input.dir8
when 2;move_diagonal(6,2)
when 4;move_diagonal(4,2)
when 6;move_diagonal(6,8)
when 8;move_diagonal(4,8)
end
end
end
不过就不能用八方向么。。。。这样走起来很奇怪
八方向:
class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● 方向键移动处理 #-------------------------------------------------------------------------- def move_by_input case Input.dir8 when 1;move_diagonal(4,2) when 2;move_straight(2) when 3;move_diagonal(6,2) when 4;move_straight(4) when 6;move_straight(6) when 7;move_diagonal(4,8) when 8;move_straight(8) when 9;move_diagonal(6,8) end end end #~
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# ● 方向键移动处理
#--------------------------------------------------------------------------
def move_by_input
case Input.dir8
when 1;move_diagonal(4,2)
when 2;move_straight(2)
when 3;move_diagonal(6,2)
when 4;move_straight(4)
when 6;move_straight(6)
when 7;move_diagonal(4,8)
when 8;move_straight(8)
when 9;move_diagonal(6,8)
end
end
end
#~
|