예제 #1
0
 public void GetExtractorStats(string id, Transform objTransform, ExtractionBuilding extractor, TileData.Types resourceType)
 {
     if (extractorsMap.ContainsKey(id))
     {
        // Debug.Log("BP Database: Found stats for " + id);
         extractor.Init(resourceType, extractorsMap[id].extractorStats.extractRate, extractorsMap[id].extractorStats.extractPower,
             extractorsMap[id].extractorStats.extractAmmount, extractorsMap[id].extractorStats.personalStorageCapacity, objTransform);
     }
 }
예제 #2
0
    public void InitSource(ExtractionBuilding e, int ammnt)
    {
        extractionSource = e;
        totalAmmntOfResource = ammnt;

        if (e.resourceType == TileData.Types.rock)
        {
            rockProdType = ResourceGrid.Grid.GetTileGameObjFromIntCoords(e.targetTile.posX, e.targetTile.posY).GetComponent<Rock_Handler>().myRock._rockProductionType;
        }
    }
 void DeEnergizeExtractor(ExtractionBuilding extractor)
 {
     extractor.extractorStats.DeEnergize();
 }
    //var distance = (mouseV2 - sightV2).sqrMagnitude;
    void EnergizeExtractionBuilding(ExtractionBuilding extractor)
    {
        // Calculate boosted Rate and Power...
        var power = boost * extractor.extractorStats.extractPower;
        var rate = boost * extractor.extractorStats.extractRate;

        // ... and Energize the Extractor's stats.
        extractor.extractorStats.Energize(rate, power);

        // Now start counting down to De Energize
        extractor.CountDownToDeEnergize(DeEnergizeExtractor, BoostDuration);
    }
예제 #5
0
 public void SetOutput(ExtractionBuilding receiver)
 {
     output = receiver;
     isConnectedToOutput = true;
 }