Esempio n. 1
0
 internal void HardRefresh()
 {
     if (_selectedEntity.Entity.HasDataBlob <CargoStorageDB>())
     {
         var storeDB = _selectedEntity.Entity.GetDataBlob <CargoStorageDB>();
         _storeVM = new CargoStorageVM(_state.Game.StaticData, storeDB);
         _storeVM.SetUpdateListner(_selectedEntity.Entity.Manager.ManagerSubpulses);
     }
     if (_selectedEntity.Entity.HasDataBlob <RefiningDB>())
     {
         var refinaryDB = _selectedEntity.Entity.GetDataBlob <RefiningDB>();
         _refineryVM = new RefiningVM(_state.Game, _selectedEntity.CmdRef, refinaryDB);
         _refineryVM.SetUpdateListner(_selectedEntity.Entity.Manager.ManagerSubpulses);
     }
     _cargoList = new CargoListPannelSimple(_staticData, _selectedEntity);
 }
Esempio n. 2
0
        internal void HardRefresh()
        {
            _factionInfoDB = _uiState.Faction.GetDataBlob <FactionInfoDB>();


            if (_selectedEntity.Entity.HasDataBlob <IndustryAbilityDB>())
            {
                _industryDB     = _selectedEntity.Entity.GetDataBlob <IndustryAbilityDB>();
                _industryPannel = new IndustryPannel2(_uiState, _selectedEntity.Entity, _industryDB);
            }
            else
            {
                _industryDB     = null;
                _industryPannel = null;
            }

            _cargoList = new CargoListPannelSimple(_staticData, _selectedEntity);
        }
Esempio n. 3
0
        internal void HardRefresh()
        {
            _factionInfoDB = _uiState.Faction.GetDataBlob <FactionInfoDB>();
            if (_selectedEntity.Entity.HasDataBlob <CargoStorageDB>())
            {
                var storeDB = _selectedEntity.Entity.GetDataBlob <CargoStorageDB>();
                _storeVM = new CargoStorageVM(_uiState.Game.StaticData, storeDB);
                _storeVM.SetUpdateListner(_selectedEntity.Entity.Manager.ManagerSubpulses);
            }

            if (_selectedEntity.Entity.HasDataBlob <IndustryAbilityDB>())
            {
                _industryDB     = _selectedEntity.Entity.GetDataBlob <IndustryAbilityDB>();
                _industryPannel = new IndustryPannel2(_uiState, _selectedEntity.Entity, _industryDB);
            }
            else
            {
                _industryDB     = null;
                _industryPannel = null;
            }

            _cargoList = new CargoListPannelSimple(_staticData, _selectedEntity);

            /*
             * lock (_factionInfoDB.ComponentDesigns)
             * {
             *  int num = _factionInfoDB.ComponentDesigns.Count;
             *  _constructableDesigns = new ComponentDesign[num];
             *  _constructablesNames = new string[num];
             *  _constructablesIDs = new Guid[num];
             *  int i = 0;
             *  foreach (var design in _factionInfoDB.ComponentDesigns)
             *  {
             *      _constructableDesigns[i] = design.Value;
             *      _constructablesIDs[i] = design.Key;
             *      _constructablesNames[i] = design.Value.Name;
             *      i++;
             *  }
             *
             *
             * }*/
        }
Esempio n. 4
0
 private ColonyPanel(StaticDataStore staticData, EntityState selectedEntity)
 {
     _selectedEntity = selectedEntity;
     _cargoList      = new CargoListPannelSimple(staticData, selectedEntity);
     _staticData     = staticData;
 }