Example #1
0
    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);
            }
        }
Example #3
0
 public HeavyDestroyTriggerFall(SquarePiece squarePiece) : base(squarePiece)
 {
 }
Example #4
0
        public void Square_Should_Be_Four_Contiguous_Blocks()
        {
            var square = new SquarePiece();

            Assert.IsTrue(square.IsFourContiguousBlocks);
        }
Example #5
0
 public DestroyTriggerFall(SquarePiece squarePiece)
 {
     _squarePiece        = squarePiece;
     Lerp.LerpCompleted += Lerp_LerpCompleted;
 }