コード例 #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();
 }