Exemple #1
0
 public override void DoTask(ResourcePool resPool, SystemLog sysLog, DataMap dataMap)
 {
     resPool.AddMineral(_mineralCollected);
     resPool.AddOrganic(_organicCollected);
     resPool.AddEnergy(_energyCollected);
     this._acted = true;
 }
Exemple #2
0
 public void GetResources(ResourcePool resPool, Ship ship, SystemLog sysLog)
 {
     if (this.Type == StarSystem.SystemType.Empty)
     {
         return;
     }
     if (!_aCollected[ship.Owner])
     {
         int inf = _aInfluence[ship.Owner];
         resPool.AddMineral((inf * _mineral) / _totalInfluence);
         resPool.AddOrganic((inf * _organic) / _totalInfluence);
         resPool.AddEnergy((inf * _energy) / _totalInfluence);
         _aCollected[ship.Owner] = true;
         sysLog[_index].AddCollectedResourceInfo((inf * _mineral) / _totalInfluence,
                                                 (inf * _organic) / _totalInfluence,
                                                 (inf * _energy) / _totalInfluence);
     }
 }