public void BuyOil()
    {
        float currentOilPrice = priceManager.GetOilPrice();

        try {
            Withdraw(currentOilPrice);
            oilNumber++;
        } catch {
            print("Fond insuffisant");
        }
    }
Exemple #2
0
 // Update is called once per frame
 void Update()
 {
     oilPriceText.text = "Pétrole : " + (int)priceManager.GetOilPrice();
 }