class Game_CharacterBase def get_direction() return @direction; end end class Game_Player < Game_Character alias old_move_by_input move_by_input; def move_by_input() return if !movable? || $game_map.interpreter.running?; case Input.dir8() when 2, 4, 6, 8; if get_direction() != Input.dir4() print "CURRENT DIRECTION : [" + get_direction().to_s() + "]\n"; for i in 0...10 Graphics.update(); print "Updating...\n"; end set_direction(Input.dir4); end move_straight(Input.dir4); print "INPUT DIRECTION : [" + Input.dir4().to_s() + "]\n"; end end end
class Game_CharacterBase
def get_direction()
return @direction;
end
end
class Game_Player < Game_Character
alias old_move_by_input move_by_input;
def move_by_input()
return if !movable? || $game_map.interpreter.running?;
case Input.dir8()
when 2, 4, 6, 8;
if get_direction() != Input.dir4()
print "CURRENT DIRECTION : [" + get_direction().to_s() + "]\n";
for i in 0...10
Graphics.update();
print "Updating...\n";
end
set_direction(Input.dir4);
end
move_straight(Input.dir4);
print "INPUT DIRECTION : [" + Input.dir4().to_s() + "]\n";
end
end
end
請樓主試一下, 應該是這樣吧== |