Project1
标题:
关于鼠标八方行走问题
[打印本页]
作者:
thh55
时间:
2012-11-11 17:15
标题:
关于鼠标八方行走问题
本帖最后由 hcm 于 2012-11-27 12:31 编辑
如何把下面的脚本改成八方脚本啊,下面只有4个方向
last_x = @x
if @last_move_x
@last_move_x = false
elsif mouse_x > screen_x + 16
move_right
elsif mouse_x < screen_x - 16
move_left
end
last_y = @y
if last_x != @x
@last_move_x = true
elsif mouse_y > screen_y
move_down
elsif mouse_y < screen_y - 32
move_up
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1