class Window_hpWindow < Window_Base
def initialize
super(0,0,600,600)
self.opacity = 0
self.visible = false
refresh
end
def refresh
self.contents.clear
draw_icon(31,0,0)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 0, 60, WLH, $game_variables[1],2)
draw_icon(32,0,20)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 20, 60, WLH, $game_variables[2],2)
draw_icon(33,0,40)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 40, 60, WLH, $game_variables[3],2)
draw_icon(34,0,60)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 60, 60, WLH, $game_variables[4],2)
draw_icon(35,0,80)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 80, 60, WLH, $game_variables[5],2)
draw_icon(36,0,100)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 100, 60, WLH, $game_variables[6],2)
end
end
class Scene_Map < Scene_Base
alias hpWindow_start start
alias hpWindow_update
update
alias hpWindow_terminate terminate
def start
hpWindow_start
@hpWindow = Window_hpWindow.new
end
def update
#@hpWindow.update
@hpWindow.refresh
@hpWindow.visible = true
hpWindow_update
end
def terminate
hpWindow_terminate
@hpWindow.dispose
end
end
class Window_hpWindow < Window_Base
def initialize
super(0,0,600,600)
self.opacity = 0
self.visible = false
refresh
end
def refresh
self.contents.clear
draw_icon(31,0,0)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 0, 60, WLH, $game_variables[1],2)
draw_icon(32,0,20)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 20, 60, WLH, $game_variables[2],2)
draw_icon(33,0,40)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 40, 60, WLH, $game_variables[3],2)
draw_icon(34,0,60)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 60, 60, WLH, $game_variables[4],2)
draw_icon(35,0,80)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 80, 60, WLH, $game_variables[5],2)
draw_icon(36,0,100)#在此修改图标,第一个数字是图标编号
self.contents.draw_text(20, 100, 60, WLH, $game_variables[6],2)
end
end
class Scene_Map < Scene_Base
alias hpWindow_start start
alias hpWindow_update
update
alias hpWindow_terminate terminate
def start
hpWindow_start
@hpWindow = Window_hpWindow.new
end
def update
#@hpWindow.update
@hpWindow.refresh
@hpWindow.visible = true
hpWindow_update
end
def terminate
hpWindow_terminate
@hpWindow.dispose
end
end