#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 480)
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
refresh
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# ● 设置升级标志
# actor_index : 角色索引
#--------------------------------------------------------------------------
def level_up(actor_index)
@level_up_flags[actor_index] = true
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.opacity=0
self.contents.clear
self.contents.font.size = 10
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
position = $data_classes[actor.class_id].position
actor_x=0
actor_y=0
case position
when 0
actor_x = 410
actor_y = i*100+20
when 1
actor_x = 495
actor_y = i*100+20
when 2
actor_x = 580
actor_y = i*100+20
end
draw_actor_name(actor, actor_x-50, actor_y)
draw_actor_hp_bar(actor,actor_x-50+11,actor_y+10+15,56 )
draw_actor_hp(actor, actor_x-50, actor_y+15, 40)
draw_actor_sp_bar(actor,actor_x-50+11,actor_y+30+10,56 )
draw_actor_sp(actor, actor_x-50, actor_y+30, 40)
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x-50, actor_y+50, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, actor_x-50, actor_y+50)
end
end
end
end