def draw_actor_cp_meter(actor, x, y, width = 156, type = 0)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+27, width+2,6, Color.new(0, 0, 0, 255))
if actor.cp == nil
actor.cp = 0
end
w = width * [actor.cp,65535].min / 65535
self.contents.fill_rect(x, y+28, w,1, Color.new(255, 255, 128, 255))
self.contents.fill_rect(x, y+29, w,1, Color.new(255, 255, 0, 255))
self.contents.fill_rect(x, y+30, w,1, Color.new(192, 192, 0, 255))
self.contents.fill_rect(x, y+31, w,1, Color.new(128, 128, 0, 255))
end
end
def refresh_cp
for i in 0...$game_party.actors.size
actor = $game_party.actors
width = [self.width*3/4 / XRXS_BP1::MAX, 80].max
space = self.width / XRXS_BP1::MAX
case XRXS_BP1::ALIGN
when 0
actor_x = i * 78 + 4
actor_y = 410 - i * 40
when 1
actor_x = (space * ((XRXS_BP1::MAX - $game_party.actors.size)/2.0 + i)).floor
when 2
actor_x = (i + XRXS_BP1::MAX - $game_party.actors.size) * space + 4
end
actor_x += self.x
draw_actor_cp_meter(actor, actor_x+307, actor_y , 50, 0)
end
end
| 欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |