本帖最后由 taroxd 于 2014-7-23 19:46 编辑
这不是我的脚本么233
class Window_MapHp < Window_Variable def draw_variable @variable.each_with_index {|rate, i| draw_gauge(50, 100*i, 150, rate, hp_gauge_color1, hp_gauge_color2) } end def variable $game_party.map(&:hp_rate) end # 加在这里,对应开关打开时显示 def show? $game_switches[开关ID] end end class Scene_Map < Scene_Base def_after(:create_all_windows) { @maphp_window = Window_MapHp.new } end
class Window_MapHp < Window_Variable
def draw_variable
@variable.each_with_index {|rate, i|
draw_gauge(50, 100*i, 150, rate, hp_gauge_color1, hp_gauge_color2) }
end
def variable
$game_party.map(&:hp_rate)
end
# 加在这里,对应开关打开时显示
def show?
$game_switches[开关ID]
end
end
class Scene_Map < Scene_Base
def_after(:create_all_windows) { @maphp_window = Window_MapHp.new }
end
|