def see
@le_true = false
if ($game_player.x-@x).abs<@le_deepness and ($game_player.y-@y).abs<@le_deepness
difference_x = ($game_player.x - @x).abs
difference_y = ($game_player.y - @y).abs
case @direction
when 2
return if @le_circle != true and $game_player.y < @y
unless @le_side and (difference_y == 0 and difference_x == 1)
return if difference_x.to_f/difference_y > @le_slope
end
when 4
return if @le_circle != true and $game_player.x > @x
unless @le_side and difference_y == 1 and difference_x == 0
return if difference_y.to_f/difference_x > @le_slope
end
when 6
return if @le_circle != true and $game_player.x < @x
unless @le_side and difference_y == 1 and difference_x == 0
return if difference_y.to_f/difference_x > @le_slope
end
else
return if @le_circle != true and $game_player.y > @y
unless @le_side and difference_y == 0 and difference_x == 1
return if difference_x.to_f/difference_y > @le_slope
end
end
if @le_mode == 0
return if (difference_x ** 2 + difference_y ** 2) > le_deepness ** 2
end
@le_true = scan_line
$game_map.events[@id].animation_id = 98
if @le_ss and @le_true !=true
@le_trace[0,0] = -1
end
end
end 作者: 弗雷德 时间: 2014-8-19 14:14
我记得event类下好像没有动画的函数,把这些东西写进character里吧,直接写event是不生效的。