Class: GamesAndRpgParadise::Tetris::ShapeJ
- Defined in:
- lib/games_and_rpg_paradise/gui/gosu/tetris/shape_j.rb
Instance Attribute Summary
Attributes inherited from Shape
Instance Method Summary collapse
-
#get_blocks ⇒ Object
# === get_blocks ========================================================================= #.
Methods inherited from ShapeL
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::ShapeL
Instance Method Details
#get_blocks ⇒ Object
#
get_blocks
#
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/games_and_rpg_paradise/gui/gosu/tetris/shape_j.rb', line 20 def 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. # ======================================================================= # old_rotation = @rotation @rotation = 0 super reverse @rotation = old_rotation apply_rotation @blocks.each { |block| block.color = 0xff0000ff } end |