赞 | 8 |
VIP | 14 |
好人卡 | 35 |
积分 | 32 |
经验 | 46931 |
最后登录 | 2024-8-10 |
在线时间 | 1442 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3176
- 在线时间
- 1442 小时
- 注册时间
- 2009-7-27
- 帖子
- 1454
|
- #========================================================================
- # ■ Window_Base
- #========================================================================
- class Window_Base < Window
- #-----------------------------------------------------------------------
- # ● HP描画
- #-----------------------------------------------------------------------
- def draw_actor_hp_meter(actor, x, y, width = 156, type = 0)
- if type == 1 and actor.hp == 0
- return
- end
- self.contents.font.color = system_color
- self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
- w = width * actor.hp / [actor.maxhp,1].max
- self.contents.fill_rect(x, y+28, w,1, Color.new(255, 96, 96, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(255, 0, 0, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(128, 0, 0, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(0, 0, 0, 255))
- end
- #-----------------------------------------------------------------------
- # ● SP描画
- #-----------------------------------------------------------------------
- def draw_actor_sp_meter(actor, x, y, width = 156, type = 0)
- if type == 1 and actor.hp == 0
- return
- end
- self.contents.font.color = system_color
- self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
- w = width * actor.sp / [actor.maxsp,1].max
- self.contents.fill_rect(x, y+28, w,1, Color.new(128, 255, 255, 255))
- self.contents.fill_rect(x, y+29, w,1, Color.new(0, 255, 255, 255))
- self.contents.fill_rect(x, y+30, w,1, Color.new(0, 192, 192, 255))
- self.contents.fill_rect(x, y+31, w,1, Color.new(0, 128, 128, 255))
- end
- end
- class Window_BattleStatus < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 320, 640, 160)
- 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.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- actor_x = i * 160 + 4
- draw_actor_name(actor, actor_x, 0)
- draw_actor_hp_meter(actor, actor_x, 48, 120)
- draw_actor_sp_meter(actor, actor_x, 64, 120)
- draw_actor_hp(actor, actor_x, 55, 120)
- draw_actor_sp(actor, actor_x, 71, 120)
- if @level_up_flags[i]
- self.contents.font.color = normal_color
- self.contents.draw_text(actor_x, 96, 120, 32, "LEVEL UP!")
- else
- draw_actor_state(actor, actor_x, 96)
- end
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|