Class: RPG::Animation::Frame
- Inherits:
-
Object
- Object
- RPG::Animation::Frame
- Defined in:
- lib/rpg/animation.rb
Overview
Data class for animation frames.
Instance Attribute Summary collapse
-
#cell_data ⇒ Object
2-dimensional array containing cell contents (Table).
-
#cell_max ⇒ Object
Number of cells.
Instance Method Summary collapse
-
#initialize ⇒ Frame
constructor
A new instance of Frame.
Constructor Details
Instance Attribute Details
#cell_data ⇒ Object
2-dimensional array containing cell contents (Table).
Generally takes the form cell_data[cell_index, data_index].
data_index ranges from 0 to 7 and denotes various information about a cell:
- 0
-
pattern
- 1
-
X-coordinate
- 2
-
Y-coordinate
- 3
-
zoom level
- 4
-
angle of rotation
- 5
-
horizontal flip
- 6
-
opacity
- 7
-
blending mode
Patterns are 1 less than the number displayed in RPGXP; -1 indicates that that cell is not in use.
73 74 75 |
# File 'lib/rpg/animation.rb', line 73 def cell_data @cell_data end |
#cell_max ⇒ Object
Number of cells. Equivalent to the largest cell number in the frame set.
54 55 56 |
# File 'lib/rpg/animation.rb', line 54 def cell_max @cell_max end |