#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
# 处理战斗画面的类。
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ● 开始选择敌人
#--------------------------------------------------------------------------
def start_enemy_select
# 生成敌人箭头
@enemy_arrow = Window_TargetEnemy.new
@enemy_arrow.x = 320 - @enemy_arrow.width / 2
@enemy_arrow.y = 240 - @enemy_arrow.height / 2
@enemy_help_window ||= Window_Help.new
@enemy_help_window.back_opacity = 160
@enemy_help_window.visible = true
@enemy_help_window.set_enemy(@enemy_arrow.enemy)
# 无效化角色指令窗口
@actor_command_window.active = false
@actor_command_window.visible = false
end
#--------------------------------------------------------------------------
# ● 结束选择敌人
#--------------------------------------------------------------------------
alias shanguangjinshanshan_end_enemy_select end_enemy_select
def end_enemy_select
shanguangjinshanshan_end_enemy_select
@enemy_help_window.visible = false
end
alias shanguangjinshanshan_update update
def update
shanguangjinshanshan_update
@shanguang_count ||= 0
@shanguang_count += 1
if @enemy_arrow != nil and @shanguang_count > 30
@shanguang_count = 0
@spriteset.enemy_sprites.reverse[@enemy_arrow.index].flash(@enemy_arrow.text_color(0), 20)
end
end
end
class Spriteset_Battle;attr_accessor :enemy_sprites;end
class Window_TargetEnemy < Window_Command
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
commands = []
@enemies = []
for enemy in $game_troop.enemies
next unless enemy.exist?
commands.push(enemy.name)
@enemies.push(enemy)
end
super(160, commands)
end
#--------------------------------------------------------------------------
# ● 获取敌人对象
#--------------------------------------------------------------------------
def enemy
return @enemies[@index]
end
end