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); }
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); } } }