Ejemplo n.º 1
0
 //MatchesOnBoard function is a helper function used in FillBoardCo.
 //It calls MatchSearch function from Match Manager.
 //Then it goes through the board and checks if there is a tile with isMatched value true.
 //If there is it returns true else false.
 private bool MatchesOnBoard()
 {
     matchManager.MatchSearch();
     for (int i = 0; i < width; i++)
     {
         for (int j = 0; j < height; j++)
         {
             if (allTiles[i, j] != null)
             {
                 if (allTiles[i, j].GetComponent <TileBehavior>().isMatched)
                 {
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
 //FindMatches is a caller function for MatchSearch function from MatchScript
 //It is called by MovePiecesCo every 120 degree rotation.
 void FindMatches()
 {
     matchManager.MatchSearch();
 }