赞 | 0 |
VIP | 8 |
好人卡 | 0 |
积分 | 1 |
经验 | 1082 |
最后登录 | 2012-6-29 |
在线时间 | 116 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 116 小时
- 注册时间
- 2011-5-10
- 帖子
- 229
|
这个是怒值显示,搭配华丽脚本用的..- #==============================================================================
- # ■ Window_BattleStatus
- #==============================================================================
- class Window_BattleStatus < Window_Selectable
- # スキンファイル名
- BTSKIN_10 = "Btskin_odg" # スキンファイル名
- BTSKIN_10XY = [300, 6] # スキン座標 [x, y]
- #--------------------------------------------------------------------------
- # ★ エイリアス
- #--------------------------------------------------------------------------
- alias initialize_str11pog initialize
- def initialize(f = false)
- @odgw = (Cache.system(BTSKIN_10)).width
- initialize_str11pog(f)
- end
- #--------------------------------------------------------------------------
- # ● アイテム作成
- #--------------------------------------------------------------------------
- alias draw_item_str11pog draw_item
- def draw_item(index)
- return unless @f
- actor = $game_party.members[index]
- draw_item_str11pog(index)
- s = @s_sprite[index]
- # ODゲージ
- s[21] = Sprite.new(@viewport)
- s[21].bitmap = Cache.system(BTSKIN_10)
- s[21].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_10XY[0]
- s[21].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_10XY[1]
- s[21].z = 4
- w = s[21].bitmap.width
- h = s[21].bitmap.height / 3
- s[21].src_rect.set(0, h, w, h)
- # ODゲージ下地
- s[22] = Sprite.new(@viewport)
- s[22].bitmap = Cache.system(BTSKIN_10)
- s[22].x = @x[index] + BTSKIN_B_XY[0] + BTSKIN_10XY[0]
- s[22].y = @y[index] + BTSKIN_B_XY[1] + BTSKIN_10XY[1]
- s[22].z = 3
- s[22].src_rect.set(0, 0, w, h)
- #
- s[23] = ((@odgw * (actor.overdrive / (actor.max_overdrive * 1.0))) + 1).truncate
- s[21].src_rect.width = s[23]
- # 不可視に
- for l in [21,22]
- s[l].opacity = 0
- end
- # 追加判定
- @s_party[index].push(actor.overdrive)
- end
- #--------------------------------------------------------------------------
- # ● オブジェクト開放
- #--------------------------------------------------------------------------
- alias dispose_str11pog dispose
- def dispose
- dispose_str11pog
- for i in 0...@s_sprite.size
- for l in [21,22]
- @s_sprite[i][l].bitmap.dispose
- @s_sprite[i][l].dispose
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- alias update_str11pog update
- def update
- update_str11pog
- return unless @f
- for i in 0...@s_sprite.size
- s = @s_sprite[i]
- v = (not KGC::OverDrive::HIDE_GAUGE_ACTOR.include?($game_party.members[i].id))
- for l in [21,22]
- s[l].visible = v
- end
- # 不透明度アップ
- if @opacity < 272
- for l in [21,22]
- s[l].opacity = @opacity
- end
- end
- # OD更新
- update_od(s,$game_party.members[i],@s_party[i])
- end
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新 (OD)
- #--------------------------------------------------------------------------
- def update_od(s,a,m)
- sr = s[21].src_rect
- # 100%フラッシュ!
- if @odgw <= sr.width and Graphics.frame_count % 4 < 2
- s[21].src_rect.y = (s[21].src_rect.height * 2)
- else
- s[21].src_rect.y = s[21].src_rect.height
- end
- # ゲージ更新
- if a.overdrive != m[6]
- s[23] = ((@odgw * (a.overdrive / (a.max_overdrive * 1.0))) + 1).truncate
- m[6] = (a.overdrive)
- end
- if sr.width != s[23]
- if sr.width < s[23]
- sr.width += 1
- else
- sr.width -= 1
- end
- sr.width = s[23] if sr.width.abs <= 1
- end
- end
- end
复制代码 |
|