void AddSpawnPoints() { // Add goblin caves and set hero/boss spawn points. for (int y = 0; y < LevelMapSize; y++) { for (int x = 0; x < LevelMapSize; x++) { var location = new CGPoint(x, y); DataMap spot = levelMap.QueryLevelMap(location); // Get the world space point for this level map pixel. CGPoint worldPoint = ConvertLevelMapPointToWorldPoint(location); if (spot.BossLocation <= 200) { levelBoss = new Boss(worldPoint); levelBoss.AddToScene(this); } else if (spot.GoblinCaveLocation >= 200) { var cave = new Cave(worldPoint); goblinCaves.Add(cave); parallaxSprites.Add(cave); cave.AddToScene(this); } else if (spot.HeroSpawnLocation >= 200) { DefaultSpawnCGPoint = worldPoint; // there's only one } } } }