public GridCellContent Get(GameEnum.GridCellContentType type) { typeCounter[type] += 1; switch (type) { case GameEnum.GridCellContentType.Destination: return(Get(destinationPrefab)); case GameEnum.GridCellContentType.Wall: return(Get(wallPrefab)); case GameEnum.GridCellContentType.Empty: return(Get(emptyPrefab)); case GameEnum.GridCellContentType.Item: return(Get(itemPrefab)); } Debug.Assert(false, "Unsupported type: " + type); return(null); }
public int Count(GameEnum.GridCellContentType type) { return(typeCounter[type]); }