- 注册时间
- 2006-3-29
- 最后登录
- 2006-11-5
⑦老手
- 积分
- 6509
|
发表于 2006-10-22 15:33:57
|
显示全部楼层
- #==============================================================================
- # ■ Window_BattleResult
- #------------------------------------------------------------------------------
- # 战斗结束时、显示获得的 EXP 及金钱的窗口。
- #==============================================================================
- class Window_BattleResult < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # exp : EXP
- # gold : 金钱
- # treasures : 宝物
- #--------------------------------------------------------------------------
- def initialize(exp, gold, treasures)
- @exp = exp
- @gold = gold
- @treasures = treasures
- super(160, 0, 320, @treasures.size * 32 + 100)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.y = 160 - height / 2
- self.back_opacity = 160
- self.visible = false
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- cx = contents.text_size(@exp.to_s).width
- self.contents.draw_text(10, 0, 20, 32, @exp.to_s)
- cx = contents.text_size("EXP").width
- self.contents.draw_text(30, 0, 50, 32, "经验")
- cx = contents.text_size(@gold.to_s).width
- self.contents.draw_text(10, 30, 70, 32, @gold.to_s)
- self.contents.draw_text(40, 30, 100, 32, $data_system.words.gold)
- y = 60
- for item in @treasures
- draw_item_name(item, 4, y)
- y += 32
- end
- end
- end
复制代码 |
|