瞎写了一段:
class Spriteset_Battle alias ca_20140720 create_actors def create_actors ca_20140720 s = @leader_sprite = Sprite.new(@viewport1) actor = $game_party.leader cn = actor.character_name s.bitmap = bitmap = Cache.character(cn) sign = cn[/^[\!\$]./] if sign && sign.include?('$') cw = bitmap.width / 3 ch = bitmap.height / 4 else cw = bitmap.width / 12 ch = bitmap.height / 8 end s.ox = cw / 2 s.oy = ch index = actor.character_index sx = (index % 4 * 3 + 1) * cw sy = (index / 4 * 4) * ch s.src_rect.set(sx, sy, cw, ch) s.x = 50 s.y = 50 s.z = 100 end alias da_20140720 dispose_actors def dispose_actors da_20140720 @leader_sprite.dispose end end
class Spriteset_Battle
alias ca_20140720 create_actors
def create_actors
ca_20140720
s = @leader_sprite = Sprite.new(@viewport1)
actor = $game_party.leader
cn = actor.character_name
s.bitmap = bitmap = Cache.character(cn)
sign = cn[/^[\!\$]./]
if sign && sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
s.ox = cw / 2
s.oy = ch
index = actor.character_index
sx = (index % 4 * 3 + 1) * cw
sy = (index / 4 * 4) * ch
s.src_rect.set(sx, sy, cw, ch)
s.x = 50
s.y = 50
s.z = 100
end
alias da_20140720 dispose_actors
def dispose_actors
da_20140720
@leader_sprite.dispose
end
end
|