Class: RoadToRubykaigi::Graphics::Player::Variant
- Inherits:
-
Data
- Object
- Data
- RoadToRubykaigi::Graphics::Player::Variant
- Defined in:
- lib/road_to_rubykaigi/graphics/player.rb
Instance Attribute Summary collapse
-
#attack_frames ⇒ Object
readonly
Returns the value of attribute attack_frames.
-
#default_frames ⇒ Object
readonly
Returns the value of attribute default_frames.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#posture ⇒ Object
readonly
Returns the value of attribute posture.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Attribute Details
#attack_frames ⇒ Object (readonly)
Returns the value of attribute attack_frames
20 21 22 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 20 def attack_frames @attack_frames end |
#default_frames ⇒ Object (readonly)
Returns the value of attribute default_frames
20 21 22 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 20 def default_frames @default_frames end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction
20 21 22 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 20 def direction @direction end |
#posture ⇒ Object (readonly)
Returns the value of attribute posture
20 21 22 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 20 def posture @posture end |
#status ⇒ Object (readonly)
Returns the value of attribute status
20 21 22 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 20 def status @status end |
Class Method Details
.build(posture:, status:, direction:, parts:) ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/road_to_rubykaigi/graphics/player.rb', line 22 def build(posture:, status:, direction:, parts:) new( posture: posture, status: status, direction: direction, default_frames: FRAMES.map { |frame| default_frame(posture, status, direction, frame, parts) }, attack_frames: FRAMES.map { |frame| attack_frame(posture, status, direction, frame, parts) }, ) end |