コード例 #1
0
        public ColonyScreenVM(GameVM gameVM, Entity colonyEntity, StaticDataStore staticData)
        {
            gameVM.Game.GameLoop.GameGlobalDateChangedEvent += GameVM_DateChangedEvent;
            _colonyEntity = colonyEntity;
            _facilities   = new ObservableCollection <FacilityVM>();
            ComponentInstancesDB instaces = colonyEntity.GetDataBlob <ComponentInstancesDB>();

            foreach (var installation in instaces.SpecificInstances)
            {
                //Facilities.Add(new FacilityVM(installation.Key, instaces));
                FacilitesList.Add(new ComponentSpecificDesignVM(installation.Key, installation.Value));
            }


            UpdatePop();



            PlanetMineralDepositVM = new PlanetMineralDepositVM(staticData, _colonyEntity.GetDataBlob <ColonyInfoDB>().PlanetEntity);

            RefineryAbilityVM = new RefineryAbilityVM(staticData, _colonyEntity);

            ConstructionAbilityVM = new ConstructionAbilityVM(staticData, _colonyEntity);

            ColonyResearchVM = new ColonyResearchVM(staticData, _colonyEntity);
        }
コード例 #2
0
 public void Refresh(bool partialRefresh = false)
 {
     PlanetMineralDepositVM.Refresh();
     RefineryAbilityVM.Refresh();
     ConstructionAbilityVM.Refresh();
     UpdatePop();
     foreach (var facilityvm in Facilities)
     {
         facilityvm.Refresh();
     }
 }