tai galera ele da erro na linha 22
- Código:
class Spriteset_Map
alias adk_initialize initialize
alias adk_dispose dispose
alias adk_update update
def initialize
crate_names
adk_initialize
end
def update
adk_update
update_names
end
def dispose
adk_dispose
dispose_names
end
def crate_names
@names = []
for event in $game_map.events.values
next if event.list == nil
for cammand in event.list
next if command.code != 108
if cammand.parameters[0].include?("cmd:nome=")
name = cammand.parameters[0].sub("cmd:nome=","")
@names.push(Sprit_Name.new(event,name))
end
end
end
end
def update_names
for sprite in @names
sprite.update
end
end
def dispose_names
for sprite in @names
sprite.dispose
end
@names.clear
end
end
class Sprite_Name < Sprite
def initialize (event,name)
super(nil)
self.bitmap = Bitmap.new(120,20)
@event = event
self.ox = 60
self.z = 999
self.bitmap.font.name = "Verdana"
self.bitmap.font.size = 14
self.bitmap.font.bold = true
self.bitmap.draw_text(0,0,120,20,name,1)
end
def update
super
self.x = @event.screen_x
self.y = @event.screen_y -48
end
def dispose
self.bitmap.dispose
self.bitmap = nil
super
end
end
Última edição por jefferson20100 em Qui Fev 23, 2012 8:40 pm, editado 1 vez(es)