这样如何?
def create_rtabcp_gauge @cpgauge_back = Sprite.new(@viewport3) @cpgauge_back.bitmap = Bitmap.new(400, 8) @cpgauge_back.bitmap.gradient_fill_rect(0, 0, 400, 16, Color.new(20, 20, 20), Color.new(50, 255, 50)) @cpgauge_back.x = 72 @cpgauge_back.y = 16 # 为战斗中的各个角色生成其图标 @icons = {} for iii in $game_party.members @icons[iii] = Sprite.new(@viewport3) #在Graphics文件夹下新建一个文件夹FightFace,然后按照角色名把小图标分别存为png格式 path = "Graphics\\FightFace\\" + iii.name + ".png" @icons[iii].bitmap = Bitmap.new(path) @icons[iii].ox = 12 @icons[iii].oy = 12 @icons[iii].x = 16 @icons[iii].y = 20 end for iii in $game_troop.members @icons[iii] = Sprite.new(@viewport3) @icons[iii].bitmap = Bitmap.new("Graphics/System/bicon2.png") @icons[iii].ox = 12 @icons[iii].oy = 12 @icons[iii].x = 16 @icons[iii].y = 20 end end
def create_rtabcp_gauge
@cpgauge_back = Sprite.new(@viewport3)
@cpgauge_back.bitmap = Bitmap.new(400, 8)
@cpgauge_back.bitmap.gradient_fill_rect(0, 0, 400, 16, Color.new(20, 20, 20), Color.new(50, 255, 50))
@cpgauge_back.x = 72
@cpgauge_back.y = 16
# 为战斗中的各个角色生成其图标
@icons = {}
for iii in $game_party.members
@icons[iii] = Sprite.new(@viewport3)
#在Graphics文件夹下新建一个文件夹FightFace,然后按照角色名把小图标分别存为png格式
path = "Graphics\\FightFace\\" + iii.name + ".png"
@icons[iii].bitmap = Bitmap.new(path)
@icons[iii].ox = 12
@icons[iii].oy = 12
@icons[iii].x = 16
@icons[iii].y = 20
end
for iii in $game_troop.members
@icons[iii] = Sprite.new(@viewport3)
@icons[iii].bitmap = Bitmap.new("Graphics/System/bicon2.png")
@icons[iii].ox = 12
@icons[iii].oy = 12
@icons[iii].x = 16
@icons[iii].y = 20
end
end
|