private Portal _stagePortal; // Can be null #endregion Fields #region Constructors protected World(WorldMap worldMap, List<GameObject> gameObjects, List<DoorGroup> doorGroups) { _worldMap = worldMap; _timeBonuses = gameObjects.OfType<TimeBonus>().ToList(); _springs = gameObjects.OfType<Spring>().ToList(); _keys = gameObjects.OfType<Key>().ToList(); _cannons = gameObjects.OfType<Cannon>().ToList(); _doors = gameObjects.OfType<Door>().ToList(); _doorGroups = doorGroups; _readOnlyTimeBonuses = new ReadOnlyCollection<TimeBonus>(_timeBonuses); _readOnlySprings = new ReadOnlyCollection<Spring>(_springs); _readOnlyKeys = new ReadOnlyCollection<Key>(_keys); _readOnlyCannons = new ReadOnlyCollection<Cannon>(_cannons); _readOnlyDoors = new ReadOnlyCollection<Door>(_doors); }
public void SetWorldMap(WorldMap worldMap) { if (_worldMap != null) { throw new InvalidOperationException("The world map is already set"); } _worldMap = worldMap; }
public WorldMapRenderer(WorldMap map) { _map = map; }