Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Sprite_Character < Sprite_Base
- #--------------------------------------------------------------------------#
- # * overwrite method :animation_set_sprites
- #--------------------------------------------------------------------------#
- def animation_set_sprites( frame )
- cell_data = frame.cell_data
- for i in 0...@cell_count
- sprite = @animation_sprites[i]
- next if sprite == nil
- pattern = cell_data[i, 0]
- if pattern == nil or pattern == -1
- sprite.visible = false
- next
- end
- unless @character.nil?
- if @character.out_of_screen?()
- sprite.visible = false
- next
- end if Game_System::ANIMATIONALG
- end
- if pattern < 100
- sprite.bitmap = @animation_bitmap1
- else
- sprite.bitmap = @animation_bitmap2
- end
- sprite.visible = true
- sprite.src_rect.set(pattern % 5 * 192,
- pattern % 100 / 5 * 192, 192, 192)
- if @animation_mirror
- sprite.x = @animation_ox - cell_data[i, 1]
- sprite.y = @animation_oy + cell_data[i, 2]
- sprite.angle = (360 - cell_data[i, 4])
- sprite.mirror = (cell_data[i, 5] == 0)
- else
- sprite.x = @animation_ox + cell_data[i, 1]
- sprite.y = @animation_oy + cell_data[i, 2]
- sprite.angle = cell_data[i, 4]
- sprite.mirror = (cell_data[i, 5] == 1)
- end
- sprite.z = self.z + 300 + i
- sprite.ox = 96
- sprite.oy = 96
- sprite.zoom_x = cell_data[i, 3] / 100.0
- sprite.zoom_y = cell_data[i, 3] / 100.0
- sprite.opacity = cell_data[i, 6] * self.opacity / 255.0
- sprite.blend_type = cell_data[i, 7]
- if @character.abs_useing_atk_anim
- adding_angle = IEX::YGGDRASIL::DEFAULT_ANIM_ANGLE
- unless @character.iex_anim_lock_direc
- direc = @character.direction
- else
- direc = @iex_started_direction
- end
- case direc
- when 2; adding_angle += @character.abs_reverse_blade_anim ? -90 : 90
- when 4; adding_angle += @character.abs_reverse_blade_anim ? 180 : 0
- when 6; adding_angle += @character.abs_reverse_blade_anim ? 0 : 180
- when 8; adding_angle += @character.abs_reverse_blade_anim ? 90 : -90
- end
- if @character.abs_reverse_blade_anim
- sprite.mirror = true
- end
- sprite.angle += adding_angle
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment