| 赞 | 72 |
| VIP | |
| 好人卡 | |
| 积分 | 23 |
| 经验 | |
| 最后登录 | 2022-3-9 |
| 在线时间 | 4033 小时 |
…あたしは天
- 梦石
- 0
- 星屑
- 2308
- 在线时间
- 4033 小时
- 注册时间
- 2010-10-4
- 回帖
- 10548
 
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
[pre lang="ruby"]
#----------------------------------------------------------------------------
# ● 该类的作用是表示一个地图上的点的坐标
# 可以伪装成 Game_Character 的对象传给一些接受 character 参数的方法。
#----------------------------------------------------------------------------
module Taroxd
Point = Struct.new(:x, :y) do
alias_method :real_x, :x
alias_method :real_y, :y
def moveto(x, y)
self.x = x
self.y = y
end
def pos?(x2, y2)
x == x2 && y == y2
end
def screen_x
$game_map.adjust_x(x) * 32 + 16
end
def screen_y
$game_map.adjust_y(y) * 32 + 32
end
end
end
[/pre] |
|