Esempio n. 1
0
 public void Start()
 {
     if (builder == null)
     {
         builder = new CivPopKerbalBuilder(this.GenerateKerbalName);
     }
     if (contractors == null)
     {
         contractors = new CivPopServiceContractors(builder);
     }
     if (death == null)
     {
         death = new CivPopServiceDeath();
     }
     if (growth == null)
     {
         growth = new CivPopServiceGrowth(builder);
     }
     if (rent == null)
     {
         rent = new CivPopServiceRent();
     }
     if (gui == null)
     {
         gui = new CivilianPopulationGUI(rent);
     }
     this.rng     = new System.Random();
     this.service = new CivilianPopulationService();
     this.monitor = new CivilianPopulationMonitor();
 }
        public void Start()
        {
            Instance = this;
            if (builder == null)
            {
                builder = new CivPopKerbalBuilder(this.GenerateKerbalName);
            }
            if (contractors == null)
            {
                contractors = new CivPopServiceContractors(builder);
            }
            if (death == null)
            {
                death = new CivPopServiceDeath();
            }
            if (growth == null)
            {
                growth = new CivPopServiceGrowth(builder);
            }
            if (rent == null)
            {
                rent = new CivPopServiceRent();
            }
            if (gui == null)
            {
                gui = new CivilianPopulationGUI(rent);
            }
            else
            {
                gui.InitButton();
            }


            this.rng     = new System.Random();
            this.service = new CivilianPopulationService();
#if DEBUG
            this.monitor = new CivilianPopulationMonitor();
#endif
            DontDestroyOnLoad(this);

            StartCoroutine(SlowUpdate());
        }