Example #1
0
 public SwapState(IGameplayManager gameplayManager, int tmpCol, int tmpRow, int col, int row)
 {
     this.gameplayManager = gameplayManager;
     this.tmpCol          = tmpCol;
     this.tmpRow          = tmpRow;
     this.col             = col;
     this.row             = row;
     gameplayManager.SwapCells(col, row, tmpCol, tmpRow);
 }
Example #2
0
 public void OnUpdate()
 {
     if (gameplayManager.isStability)
     {
         var matches = gameplayManager.Match();
         if (matches != null)
         {
             //gameplayManager.RemoveCells(matches);
             gameplayManager.state = new UpdatingState(gameplayManager);
         }
         else
         {
             gameplayManager.SwapCells(col, row, tmpCol, tmpRow);
             gameplayManager.state = new UpdatingState(gameplayManager);
         }
     }
 }