Exemple #1
0
 public ResourceProductionComponent(ConstructionItem ci, Level level) : base(ci)
 {
     this.m_vTimeSinceLastClick     = level.GetTime();
     this.m_vProductionResourceData = ObjectManager.DataTables.GetResourceByName(((BuildingData)ci.GetData()).ProducesResource);
     this.m_vResourcesPerHour       = ((BuildingData)ci.GetData()).ResourcePerHour;
     this.m_vMaxResources           = ((BuildingData)ci.GetData()).ResourceMax;
 }
 public ResourceProductionComponent(ConstructionItem ci, Level level) : base(ci)
 {
     m_vTimeSinceLastClick     = level.Avatar.LastTickSaved;
     m_vProductionResourceData =
         CSVManager.DataTables.GetResourceByName(((BuildingData)ci.GetData()).ProducesResource);
     m_vResourcesPerHour = ((BuildingData)ci.GetData()).ResourcePerHour;
     m_vMaxResources     = ((BuildingData)ci.GetData()).ResourceMax;
 }
 public ResourceProductionComponent(ConstructionItem ci, Level level)
     : base(ci)
 {
     this.m_vTimeSinceLastClick = level.GetTime();
     this.m_vProductionResourceData = ObjectManager.DataTables.GetResourceByName(((BuildingData)ci.GetData()).ProducesResource);
     this.m_vResourcesPerHour = ((BuildingData)ci.GetData()).ResourcePerHour;
     this.m_vMaxResources = ((BuildingData)ci.GetData()).ResourceMax;
 }
        public CombatComponent(ConstructionItem ci, Level level) : base(ci)
        {
            var bd = (BuildingData)ci.GetData();

            if (bd.AmmoCount != 0)
            {
                m_vAmmo = bd.AmmoCount;
            }
        }