PARA_CTB::FRAME_BORDER*2, height-PARA_CTB::FRAME_BORDER*2, PARA_CTB::BACK_COLOR)
now = now > max ? max : now
percentage = max != 0 ? (width-2) * now / max.to_f : 0
if start_color == end_color
self.contents.fill_rect(x+1, y+1, percentage, height-2, start_color)
else
for i in 1..percentage
r = start_color.red + (end_color.red - start_color.red) / percentage * i
g = start_color.green + (end_color.green - start_color.green) / percentage * i
b = start_color.blue + (end_color.blue - start_color.blue) / percentage * i
a = start_color.alpha + (end_color.alpha - start_color.alpha) / percentage * i
self.contents.fill_rect(x+i, y+1, 1, height-2, Color.new(r, g, b, a))
end
end
end
end
class Sprite_Battler < RPG::Sprite
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
alias ctb_update update
def update
ctb_update
if @battler != nil
if @battler.full_ct and @battler.ct_visible
# CTが溜まったバトラーの色調を変化させる
fullct_color = PARA_CTB::FULL_CT_COLOR
self.tone = fullct_color
else
fullct_color = Tone.new(0,0,0)
self.tone = fullct_color
end
end
end
end