def draw_actor_hp(actor, x, y, width = 144)
bitmap2 = RPG::Cache.icon("HP空槽")
self.contents.blt(x, y, bitmap2, Rect.new(0, 0, bitmap2.width, bitmap2.height))
bitmap = RPG::Cache.icon("hp条")
width = bitmap.width * actor.hp * 100 / actor.maxhp / 100
self.contents.blt(x + 44, y + 2, bitmap, Rect.new(0, 0, width, bitmap.height))
self.contents.font.size = 15
self.contents.font.bold = true
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
cx = contents.text_size(actor.hp.to_s).width
self.contents.draw_text(x + 85, y-7, cx, 32, actor.hp.to_s)
self.contents.font.color = normal_color
txt = "/" + actor.maxhp.to_s
self.contents.draw_text(x + 85 + cx, y-7, 126, 32, txt)
end
def draw_actor_hp(actor, x, y, width = 144)
bitmap2 = RPG::Cache.icon("HP空槽")
self.contents.blt(x, y, bitmap2, Rect.new(0, 0, bitmap2.width, bitmap2.height))
bitmap = RPG::Cache.icon("hp条")
width = bitmap.width * actor.hp * 100 / actor.maxhp / 100
self.contents.blt(x + 44, y + 2, bitmap, Rect.new(0, 0, width, bitmap.height))
self.contents.font.size = 15
self.contents.font.bold = true
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
cx = contents.text_size(actor.hp.to_s).width
self.contents.draw_text(x + 85, y-7, cx, 32, actor.hp.to_s)
self.contents.font.color = normal_color
txt = "/" + actor.maxhp.to_s
self.contents.draw_text(x + 85 + cx, y-7, 126, 32, txt)
end