public SquarePiece GetSquarePiece(int pLocation_x, int pLocation_y) { SquarePiece sq = new SquarePiece(); for (int i = 0; i < squarePieceList.Count; i++) { if (squarePieceList[i].square.Location_x == pLocation_x && squarePieceList[i].square.Location_y == pLocation_y) { sq = squarePieceList [i]; } } return(sq); }
private void SquarePiece_PieceDestroyed(SquarePiece piece) { piece.PieceDestroyed -= SquarePiece_PieceDestroyed; if (selectedPieces.Contains(piece)) { selectedPieces.Remove(piece); } if (selectedPositions.Contains(piece.Position)) { selectedPositions.Remove(piece.Position); } }
public HeavyDestroyTriggerFall(SquarePiece squarePiece) : base(squarePiece) { }
public void Square_Should_Be_Four_Contiguous_Blocks() { var square = new SquarePiece(); Assert.IsTrue(square.IsFourContiguousBlocks); }
public DestroyTriggerFall(SquarePiece squarePiece) { _squarePiece = squarePiece; Lerp.LerpCompleted += Lerp_LerpCompleted; }