#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor)
hppercent = actor.hp.to_f / actor.maxhp.to_f
if hppercent > 0.66
@sprites[1].bitmap = RPG::Cache.picture($game_set.hpbar_good)
elsif hppercent > 0.33
@sprites[1].bitmap = RPG::Cache.picture($game_set.hpbar_okay)
else
@sprites[1].bitmap = RPG::Cache.picture($game_set.hpbar_bad)
end
bar_width = (@sprites[1].bitmap.width.to_f * hppercent).round
w = @sprites[1].bitmap.width-bar_width
@sprites[1].src_rect = Rect.new(0, 0, bar_width, @sprites[1].bitmap.height)
end