Class: RPG::Animation

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/animation.rb

Defined Under Namespace

Classes: Frame, Timing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAnimation

Returns a new instance of Animation


5
6
7
8
9
10
11
12
13
14
# File 'lib/rpg/animation.rb', line 5

def initialize
  @id = 0
  @name = ""
  @animation_name = ""
  @animation_hue = 0
  @position = 1
  @frame_max = 1
  @frames = [RPG::Animation::Frame.new]
  @timings = []
end

Instance Attribute Details

#animation_hueObject

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


26
27
28
# File 'lib/rpg/animation.rb', line 26

def animation_hue
  @animation_hue
end

#animation_nameObject

The animation's graphic file name.


23
24
25
# File 'lib/rpg/animation.rb', line 23

def animation_name
  @animation_name
end

#frame_maxObject

Number of frames.


36
37
38
# File 'lib/rpg/animation.rb', line 36

def frame_max
  @frame_max
end

#framesArray<RPG::Animation::Frame>

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

Returns:


40
41
42
# File 'lib/rpg/animation.rb', line 40

def frames
  @frames
end

#idObject

The animation ID.


17
18
19
# File 'lib/rpg/animation.rb', line 17

def id
  @id
end

#nameObject

The animation name.


20
21
22
# File 'lib/rpg/animation.rb', line 20

def name
  @name
end

#positionObject

The animation's position:

0

top

1

middle

2

bottom

3

screen


33
34
35
# File 'lib/rpg/animation.rb', line 33

def position
  @position
end

#timingsArray<RPG::Animation::Timing>

Timing for SE and flash effects. An Timing array.

Returns:


44
45
46
# File 'lib/rpg/animation.rb', line 44

def timings
  @timings
end