Beispiel #1
0
 public SystemCenterSpawner(
     ObjectGlobalTunables globalTunables,
     ObjectRegistry registry,
     SystemCenterFacade.Factory factory,
     Settings settings,
     [Inject(Id = "PlanetoidSpawner")] ObjectSpawner planetoidSpawner)
     : base(globalTunables, registry)
 {
     ObjectFactory     = factory;
     _settings         = settings;
     _planetoidSpawner = (PlanetoidSpawner)planetoidSpawner;
 }
        public void Construct(
            [Inject(Id = "PlanetoidSpawner")] ObjectSpawner objectSpawer,
            [Inject(Id = "ShipSpawner")] ObjectSpawner shipSpawner,
            [Inject(Id = "SystemCenterSpawner")] ObjectSpawner systemCenterSpawner)
        {
            _systemSpawner = (SystemCenterSpawner)systemCenterSpawner;
            _systemSpawner.SpawnInitSystems();

            _planetoidSpawner = (PlanetoidSpawner)objectSpawer;
            //_planetoidSpawner.DespawnAllPlanetoids();
            _planetoidSpawner.SpawnInitPlanetoids();

            _shipSpawner = (ShipSpawner)shipSpawner;
            //_shipSpawner.SpawnObject();
        }