加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 yang1zhi 于 2016-3-16 13:44 编辑
RHOMBUS是菱形范围
SQUARE是矩形范围
LINE是线型范围
这是XAS的攻击范围。
XAS攻击的时候只是从仓库从复制过来个事件,但是这样不好表示哪个部位有被攻击到。
虽然能播放动画,但是不好设置。
能不能在这些部位显示图片,比如RTP那个魔法阵。
case @action.attack_range_type when Map::RHOMBUS hit_check = (dx.abs + dy.abs <= range) when Map::SQUARE hit_check = (dx.abs <= range and dy.abs <= range) when Map::LINE case self.direction when 2 hit_check = (dx == 0 and dy >= 0 and dy <= range) when 8 hit_check = (dx == 0 and dy <= 0 and dy >= -range) when 6 hit_check = (dy == 0 and dx >= 0 and dx <= range) when 4 hit_check = (dy == 0 and dx <= 0 and dx >= -range) end end
case @action.attack_range_type
when Map::RHOMBUS
hit_check = (dx.abs + dy.abs <= range)
when Map::SQUARE
hit_check = (dx.abs <= range and dy.abs <= range)
when Map::LINE
case self.direction
when 2
hit_check = (dx == 0 and dy >= 0 and dy <= range)
when 8
hit_check = (dx == 0 and dy <= 0 and dy >= -range)
when 6
hit_check = (dy == 0 and dx >= 0 and dx <= range)
when 4
hit_check = (dy == 0 and dx <= 0 and dx >= -range)
end
end
我想了下,好像不是改这里 |