赞 | 23 |
VIP | 22 |
好人卡 | 18 |
积分 | 608 |
经验 | 44466 |
最后登录 | 2024-11-9 |
在线时间 | 1934 小时 |
Lv6.析梦学徒 Fuzzy Ginkgo Taciturn Knight
- 梦石
- 0
- 星屑
- 60819
- 在线时间
- 1934 小时
- 注册时间
- 2010-6-26
- 帖子
- 1605
|
本帖最后由 orzfly 于 2011-8-19 17:44 编辑
- #==============================================================================
- # ■ Window_Actorlevel
- #------------------------------------------------------------------------------
- # 显示角色等级的窗口。
- #==============================================================================
- class Window_Actorlevel < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor : 角色
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 190, 100)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = 160
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @old_data = []
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- @old_data.push([actor.sp, actor.maxsp])
- actor_x = i * 160
- draw_actor_sp(actor, actor_x, 10)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def update
- super
- return refresh if $game_party.actors.size != @old_data.size
- for i in 0...$game_party.actors.size
- return refresh if @old_data[i][0] != $game_party.actors.sp or @old_data[i][1] != $game_party.actors.maxsp
- end
- end
- end
- class Scene_Map
- alias old_main main
- def main
- @Window_Actorlevel = Window_Actorlevel.new
- old_main
- @Window_Actorlevel.dispose
- end
- alias old_update update
- def main
- @Window_Actorlevel.update
- old_update
- end
- end
复制代码 |
|