本帖最后由 三途亚梦 于 2015-3-19 03:38 编辑
因为敌人没有行走图,暂时还只显示为原来那个骷髅头图标。
#============================================================================== # ■ Spriteset_Battle #------------------------------------------------------------------------------ # 处理战斗画面的精灵的类。本类在 Scene_Battle 类的内部使用。 #============================================================================== class Spriteset_Battle 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(0, 255, 0), Color.new(255, 0, 0)) @cpgauge_back.x = 16 @cpgauge_back.y = 16 # 为战斗中的各个角色生成其图标 @icons = {} for iii in $game_party.members @icons[iii] = Sprite.new(@viewport3) @icons[iii].bitmap = Bitmap.new("Graphics/Characters/"+iii.character_name) @icons[iii].ox = 12 @icons[iii].oy = 12 @icons[iii].x = 16 @icons[iii].y = 20 index = iii.character_index * 3 indey = index > 9 ? 4 : 0 index = index - 12 if index > 9 if iii.character_name.include?('$') cw = @icons[iii].bitmap.width / 3 ch = @icons[iii].bitmap.height / 4 @icons[iii].src_rect.set(index % 3 * 32 + cw, index / 4 * 32, cw, ch) else cw = @icons[iii].bitmap.width / 12 ch = @icons[iii].bitmap.height / 8 @icons[iii].src_rect.set(index * 32 + cw, indey * 32, cw, ch) end 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 end
#==============================================================================
# ■ Spriteset_Battle
#------------------------------------------------------------------------------
# 处理战斗画面的精灵的类。本类在 Scene_Battle 类的内部使用。
#==============================================================================
class Spriteset_Battle
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(0, 255, 0), Color.new(255, 0, 0))
@cpgauge_back.x = 16
@cpgauge_back.y = 16
# 为战斗中的各个角色生成其图标
@icons = {}
for iii in $game_party.members
@icons[iii] = Sprite.new(@viewport3)
@icons[iii].bitmap = Bitmap.new("Graphics/Characters/"+iii.character_name)
@icons[iii].ox = 12
@icons[iii].oy = 12
@icons[iii].x = 16
@icons[iii].y = 20
index = iii.character_index * 3
indey = index > 9 ? 4 : 0
index = index - 12 if index > 9
if iii.character_name.include?('$')
cw = @icons[iii].bitmap.width / 3
ch = @icons[iii].bitmap.height / 4
@icons[iii].src_rect.set(index % 3 * 32 + cw, index / 4 * 32, cw, ch)
else
cw = @icons[iii].bitmap.width / 12
ch = @icons[iii].bitmap.height / 8
@icons[iii].src_rect.set(index * 32 + cw, indey * 32, cw, ch)
end
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
end
|