#--------------------------------------------------------------------------
# ● Update
#--------------------------------------------------------------------------
def update
super
@damage_sprites = [] if @damage_sprites.nil?
@damage_durations = [] if @damage_durations.nil?
if @_damage_sprite != nil and @_damage_sprite.visible
if @damage_ox != nil
dam_ox = @damage_ox
else
dam_ox = 0
end
if @damage_type != nil
dam_type = @damage_type
end
x = damage_x_init_velocity
y = damage_y_init_velocity
d = @_damage_duration
@damage_sprites.push(Sprite_Damage.new(@_damage_sprite, x, y, d,dam_ox,dam_type))
@_damage_sprite.visible = false
end
for damage_sprite in @damage_sprites
damage_sprite.update
end
for i in 0...@damage_sprites.size
@damage_sprites = nil if @damage_sprites.disposed?
end
@damage_sprites.compact!
end
def dispose
super
if @damage_sprites != nil
for damage_sprite in @damage_sprites
damage_sprite.dispose
end
end
end
end作者: tan12345 时间: 2014-9-23 23:26
哪一行是6263行?作者: tdkjqqwy 时间: 2014-9-24 12:05