#==============================================================================
# ■ Arrow_Enemy
#------------------------------------------------------------------------------
# 选择敌人的箭头光标。本类继承 Arrow_Base
# 类。
#==============================================================================
class Arrow_Enemy < Arrow_Base
#--------------------------------------------------------------------------
# ● 获取光标指向的敌人
#--------------------------------------------------------------------------
def enemy
return $game_troop.enemies[@index]
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 如果指向不存在的敌人就离开
$game_troop.enemies.size.times do
break if self.enemy.exist?
[url=home.php?mod=space&uid=370741]@Index[/url] += 1
[url=home.php?mod=space&uid=370741]@Index[/url] %= $game_troop.enemies.size
end
#
if Input.repeat?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
$game_troop.enemies.size.times do
@index += 1
@index %= $game_troop.enemies.size
break if self.enemy.exist?
end
end
# 光标左
if Input.repeat?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
$game_troop.enemies.size.times do
@index += $game_troop.enemies.size - 1
@index %= $game_troop.enemies.size
break if self.enemy.exist?
end
end
# 设置活动块坐标
if self.enemy != nil
self.x = self.enemy.screen_x
self.y = self.enemy.screen_y
end
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
# 帮助窗口显示敌人的名字与状态
@help_window.set_enemy(self.enemy)
end
end