Beispiel #1
0
 public void TradeOilToFuel()
 {
     if (refinery != null && worldData != null && playerInfo != null)
     {
         if (refinery.oilStored >= worldData.oilVolume && playerInfo.fuel + worldData.oilVolume < worldData.maxFuel)
         {
             refinery.RemoveOil();
             playerInfo.AddFuel(worldData.oilVolume * convertionRatio);
         }
     }
     else
     {
         Debug.Log("failed to tradeoiltofuel in sellresourcerefinery");
     }
 }