Exemplo n.º 1
0
 public void turn(Tetromino.TurnDirection dir, bool withPositionChange = false)
 {
     position.unlockTile();
     position = arena.tile[position.x + (int)dir, position.y];
     if (withPositionChange)
     {
         transform.position = position.transform.position;
     }
     position.lockTile(this);
 }
Exemplo n.º 2
0
 public void fallDownOnce(bool withPositionChange = false)
 {
     position.unlockTile();
     position = arena.tile[position.x, position.y + 1];
     if (withPositionChange)
     {
         transform.position = position.transform.position;
     }
     position.lockTile(this);
 }
Exemplo n.º 3
0
 public void rotate(TetrominoRotationTile rot)
 {
     position.unlockTile();
     position = rot.tile;
     position.lockTile(this);
 }
Exemplo n.º 4
0
 public void endFalling()
 {
     position.lockTile(this);
     arena.addRowToCheck(position.y);
 }