#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24 ####这个是字体大小,默认是24
@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)
hpwidth = @bmp_bak.width * actor.hp / actor.maxhp
rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
#---------------------------------------------------
self.contents.blt(actor_x + 80,200,@bmp_bak,rect)
rect = Rect.new(0,0,hpwidth,@bmp_bak.height)
self.contents.blt(actor_x + 80,200,@bmp_hp,rect)
spwidth = @bmp_bak.width * actor.sp / actor.maxsp
rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_bak,rect)
rect = Rect.new(0,0,spwidth,@bmp_bak.height)
self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_sp,rect)
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 24 ####这个是字体大小,默认是24
@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)
hpwidth = @bmp_bak.width * actor.hp / actor.maxhp
rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
#---------------------------------------------------
self.contents.blt(actor_x + 80,200,@bmp_bak,rect)
rect = Rect.new(0,0,hpwidth,@bmp_bak.height)
self.contents.blt(actor_x + 80,200,@bmp_hp,rect)
spwidth = @bmp_bak.width * actor.sp / actor.maxsp
rect = Rect.new(0,0,@bmp_bak.width,@bmp_bak.height)
self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_bak,rect)
rect = Rect.new(0,0,spwidth,@bmp_bak.height)
self.contents.blt(actor_x + 80,200+@bmp_bak.height-15,@bmp_sp,rect)
# ===============================================================
# 加头像
# ===============================================================
@actor_face = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
@actor_face[i] = Sprite.new
@actor_face[i].bitmap = Bitmap.new\
("Graphics/face/"+actor.name.to_s+".png")
@actor_face[i].x = i * 210 + 4 + 20# 头像X坐标
@actor_face[i].y = 372 + 140 # 头像Y坐标
@actor_face[i].z = 999 # 头像Z 101在文字下 没特殊需要就别动了
end
# ===============================================================
# 加头像
# ===============================================================
@actor_face = []
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
@actor_face[i] = Sprite.new
@actor_face[i].bitmap = Bitmap.new\
("Graphics/face/"+actor.name.to_s+".png")
@actor_face[i].x = i * 210 + 4 + 20# 头像X坐标
@actor_face[i].y = 372 + 140 # 头像Y坐标
@actor_face[i].z = 999 # 头像Z 101在文字下 没特殊需要就别动了
end