/// <summary> /// 2 overload functions for checking a single tile /// and checking a selection group. /// </summary> public TileMatches CheckTileForMaches(TileGroup group) { TileMatches matches = new TileMatches(); //_gameState = GameState.matching; foreach (var go in group.tiles) { matches.AddObjectRange(CheckTileForMaches(go.gameObject).MatchedTiles); } return(matches); }
public TileMatches CheckTileForMaches(GameObject go) { TileMatches matches = new TileMatches(); //_gameState = GameState.matching; GetMatchesTest(go); if (totalMatches.Count > 2) { matches.AddObjectRange(totalMatches); Explode(Helpers.FindGroupCenter(totalMatches), totalMatches[0].GetComponent <Tile>().color); } ClearMatches(); return(matches); }