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); }
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); }
public void rotate(TetrominoRotationTile rot) { position.unlockTile(); position = rot.tile; position.lockTile(this); }
public void endFalling() { position.lockTile(this); arena.addRowToCheck(position.y); }