RPG::Animation

The data class for animation.

Superclass

Attributes

id

The animation ID.

name

The animation name.

animation1_name

The file name of the first animation's graphic.

animation1_hue

The adjustment value for the hue of the first animation's graphic (0..360).

animation2_name

The file name of the second animation's graphic.

animation2_hue

The adjustment value for the hue of the second animation's graphic (0..360).

position

The base position (0: head, 1: center, 2: feet, 3: screen).

frame_max

Number of frames.

frames

Frame contents. An RPG::Animation::Frame array.

timings

Timing for SE and flash effects. An RPG::Animation::Timing array.

Method

to_screen?

Determines whether the animation is to be displayed full screen. Returns true if the value of position is 3.

Inner Classes

Definition

class RPG::Animation
  def initialize
    @id = 0
    @name = ''
    @animation1_name = ''
    @animation1_hue = 0
    @animation2_name = ''
    @animation2_hue = 0
    @position = 1
    @frame_max = 1
    @frames = [RPG::Animation::Frame.new]
    @timings = []
  end
  def to_screen?
    @position == 3
  end
  attr_accessor :id
  attr_accessor :name
  attr_accessor :animation1_name
  attr_accessor :animation1_hue
  attr_accessor :animation2_name
  attr_accessor :animation2_hue
  attr_accessor :position
  attr_accessor :frame_max
  attr_accessor :frames
  attr_accessor :timings
end