Exemple #1
0
 private ScPlanet getPlanet(string name, Double orbitalMKm, Double orbitalDays)
 {
     ScPlanet plan = new ScPlanet();
     plan.OrbitKm = orbitalMKm * 1000000d;
     plan.OrbitDays = orbitalDays;
     plan.Name = name;
     return plan;
 }
        public PlanetController(Planet p, IActorRef actorTextOutput)
        {
            _model = p;
            _actorTextOutput = actorTextOutput;
            _scPlanet = StarChart.GetPlanet(_model.StarChartId);
            _orbitHours = _scPlanet.OrbitDays * Globals.DAYS_TO_TICKS_FACTOR;

            _producerCs = new HashSet<ProducerController>();
            // create child controllers for each producer in planet
            foreach (Producer prod in p.Producers)
            {
                ProducerController pc = new ProducerController(prod, this, actorTextOutput);
                _producerCs.Add(pc);
            }
        }
Exemple #3
0
 public static Int64 GetIdForObject(ScPlanet obj)
 {
     return GetID<ScPlanet>(_scPlanets, obj);
 }
        private Planet GetPlanet(ScPlanet chartP)
        {
            Planet plan = new Planet();
            plan.Name = chartP.Name;
            plan.Population = 10000;

            Society soc = new Society();
            soc.Name = chartP.Name + " Soc";
            plan.Society = soc;

            return plan;
        }