赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 1 |
经验 | 4639 |
最后登录 | 2021-2-17 |
在线时间 | 100 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 100 小时
- 注册时间
- 2014-10-22
- 帖子
- 161
|
7楼
楼主 |
发表于 2014-11-9 22:12:40
|
只看该作者
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
# 显示战斗画面同伴状态的窗口。
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@level_up_flags = [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.contents.clear
actor = $game_party.actors[0]
return if actor == nil
draw_actor_graphic(actor, 20, 40)
draw_actor_name(actor, 0, 0)
draw_actor_hp(actor, 80, 32, 120)
draw_actor_sp(actor, 80, 64, 120)
if @level_up_flags[0]
self.contents.font.color = normal_color
self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
else
draw_actor_state(actor, 80, 96)
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
# 主界面的不透明度下降
if $game_temp.battle_main_phase
self.contents_opacity -= 4 if self.contents_opacity > 191
else
self.contents_opacity += 4 if self.contents_opacity < 255
end
end
end
|
|