Пример #1
0
    public void BuyOil()
    {
        float currentOilPrice = priceManager.GetOilPrice();

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