Class: GamesAndRpgParadise::Tetris::ShapeS
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/tetris/shape_s.rb
Instance Attribute Summary
Attributes inherited from Shape
Instance Method Summary collapse
-
#get_blocks ⇒ Object
# === get_blocks.
Methods inherited from ShapeZ
Methods inherited from Shape
#apply_rotation, #collide, #draw, #get_bounds, #initialize, #needs_fall_update?, #needs_move_update?, #reset_internal_variables, #reverse, #update
Constructor Details
This class inherits a constructor from GamesAndRpgParadise::Tetris::ShapeZ
Instance Method Details
#get_blocks ⇒ Object
#
get_blocks
Reverse will reverse also the direction of rotation that’s applied in apply_rotation.
This will temporary disable rotation in the super method, so we can handle the rotation here after the reverse.
#
26 27 28 29 30 31 32 33 34 |
# File 'lib/games_and_rpg_paradise/gui/gosu/tetris/shape_s.rb', line 26 def get_blocks old_rotation = @rotation @rotation = 0 super reverse @rotation = old_rotation apply_rotation @blocks.each { |block| block.color = 0xff00ff00} end |