Esempio n. 1
0
        public GameObject GetRandomEmptySlotObject()
        {
            int        randomRow    = Random.Range(0, slotGrid.Height);
            int        randomColumn = Random.Range(0, slotGrid.Width);
            GameObject randomSlot   = slotGrid.GetGridItemObjectByRowColumn(randomRow, randomColumn);
            PieceDestinationController pieceDestinationController = randomSlot.GetComponent <PieceDestinationController>();

            GameObject.DestroyImmediate(pieceDestinationController.Piece);
            pieceDestinationController.SetEmpty();
            pieceDestinationController.Clean();

            return(randomSlot);
        }
Esempio n. 2
0
 private GameObject GetSlotObjectByRowAndColumn(int row, int column)
 {
     return(grid.GetGridItemObjectByRowColumn(row, column));
 }
Esempio n. 3
0
 public GameObject GetGridItemObjectByRowColumn(int row, int column)
 {
     return(grid.GetGridItemObjectByRowColumn(row, column));
 }