#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
@vs.dispose
@hp1.dispose
@hp2.dispose
@sp2.dispose if @sp2 !=nil
@sp1.dispose if @sp1 !=nil
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
@item_max = 1
self.contents.font.bold = false
self.contents.font.color = Color.new(0,0, 0, 255)
@vs=Sprite.new
@vs.bitmap=Bitmap.new("Graphics/Pictures/VS.png")
@vs.x=295
@vs.y=120
@vs.z=200
self.contents.font.color =Color.new(0,0, 0, 255)
draw_HP1(@actor, 0, 24)
draw_SP1(@actor, 0, 48) if @actor.maxsp>0
draw_HP2(@enemy, 320, 24)
draw_SP2(@enemy, 320, 48) if @enemy.maxsp>0
end
def draw_HP1(actor,x, y, w1=100)
@hp1=Sprite.new
@hp1.bitmap=Bitmap.new("Graphics/Pictures/HP.png")
@hp1.x=96
@hp1.y=204
@hp1.z=200
end
#--------------------------------------------------------------------------
# ● 释放
#--------------------------------------------------------------------------
def dispose
super
@vs.dispose
@hp1.dispose
@hp2.dispose
@sp2.dispose if @sp2 !=nil
@sp1.dispose if @sp1 !=nil
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 18
@item_max = 1
self.contents.font.bold = false
self.contents.font.color = Color.new(0,0, 0, 255)
@vs=Sprite.new
@vs.bitmap=Bitmap.new("Graphics/Pictures/VS.png")
@vs.x=295
@vs.y=120
@vs.z=200
self.contents.font.color =Color.new(0,0, 0, 255)
draw_HP1(@actor, 0, 24)
draw_SP1(@actor, 0, 48) if @actor.maxsp>0
draw_HP2(@enemy, 320, 24)
draw_SP2(@enemy, 320, 48) if @enemy.maxsp>0
end
def draw_HP1(actor,x, y, w1=100)
@hp1=Sprite.new
@hp1.bitmap=Bitmap.new("Graphics/Pictures/HP.png")
@hp1.x=96
@hp1.y=204
@hp1.z=200
end