Class: RPG::Animation
- Inherits:
-
Object
- Object
- RPG::Animation
- Defined in:
- lib/rpg/animation.rb,
lib/rpg/animation/frame.rb,
lib/rpg/animation/timing.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#animation1_hue ⇒ Object
Returns the value of attribute animation1_hue.
-
#animation1_name ⇒ Object
Returns the value of attribute animation1_name.
-
#animation2_hue ⇒ Object
Returns the value of attribute animation2_hue.
-
#animation2_name ⇒ Object
Returns the value of attribute animation2_name.
-
#frame_max ⇒ Object
Returns the value of attribute frame_max.
-
#frames ⇒ Object
Returns the value of attribute frames.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#position ⇒ Object
Returns the value of attribute position.
-
#timings ⇒ Object
Returns the value of attribute timings.
Instance Method Summary collapse
-
#initialize ⇒ Animation
constructor
A new instance of Animation.
- #to_screen? ⇒ Boolean
Constructor Details
#initialize ⇒ Animation
Returns a new instance of Animation.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rpg/animation.rb', line 3 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 |
Instance Attribute Details
#animation1_hue ⇒ Object
Returns the value of attribute animation1_hue.
21 22 23 |
# File 'lib/rpg/animation.rb', line 21 def animation1_hue @animation1_hue end |
#animation1_name ⇒ Object
Returns the value of attribute animation1_name.
20 21 22 |
# File 'lib/rpg/animation.rb', line 20 def animation1_name @animation1_name end |
#animation2_hue ⇒ Object
Returns the value of attribute animation2_hue.
23 24 25 |
# File 'lib/rpg/animation.rb', line 23 def animation2_hue @animation2_hue end |
#animation2_name ⇒ Object
Returns the value of attribute animation2_name.
22 23 24 |
# File 'lib/rpg/animation.rb', line 22 def animation2_name @animation2_name end |
#frame_max ⇒ Object
Returns the value of attribute frame_max.
25 26 27 |
# File 'lib/rpg/animation.rb', line 25 def frame_max @frame_max end |
#frames ⇒ Object
Returns the value of attribute frames.
26 27 28 |
# File 'lib/rpg/animation.rb', line 26 def frames @frames end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/rpg/animation.rb', line 18 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/rpg/animation.rb', line 19 def name @name end |
#position ⇒ Object
Returns the value of attribute position.
24 25 26 |
# File 'lib/rpg/animation.rb', line 24 def position @position end |
#timings ⇒ Object
Returns the value of attribute timings.
27 28 29 |
# File 'lib/rpg/animation.rb', line 27 def timings @timings end |
Instance Method Details
#to_screen? ⇒ Boolean
15 16 17 |
# File 'lib/rpg/animation.rb', line 15 def to_screen? @position == 3 end |