Exemplo n.º 1
0
 public void AddMoney(StdBigNumber _amount)
 {
     money += _amount;
     ui.UpdateMoneyText(MoneyTools.GetFormatedMoneyText(money), MoneyTools.GetScaleName(money));
     if (onMoneyChanged != null)
     {
         onMoneyChanged();
     }
 }
Exemplo n.º 2
0
 public void ShowStartUpScreen()
 {
     startUpWindow.SetActive(!startUpWindow.activeSelf);
     if (startUpWindow.activeSelf)
     {
         TimeSpan t = TimeTools.TimeSpentOffline();
         timeSpentOffline.text = Mathf.Floor((float)t.TotalHours) + "h " + t.Minutes + "m " + t.Seconds + "s";
         BigNumber.StdBigNumber earnedOffline = GameManager.instance.HowMuchEarnedOffline();
         earnedWhileOffline.text = MoneyTools.GetFormatedMoneyText(earnedOffline) + " " + MoneyTools.GetScaleName(earnedOffline);
     }
 }
Exemplo n.º 3
0
    public void AddMoney(string _amount)
    {
        StdBigNumber number = new StdBigNumber(_amount);

        money += number;
        ui.UpdateMoneyText(MoneyTools.GetFormatedMoneyText(money), MoneyTools.GetScaleName(money));
        if (onMoneyChanged != null)
        {
            onMoneyChanged();
        }
    }
Exemplo n.º 4
0
    void Awake()
    {
        instance = this;                            //Set instance to this, so that you can access this script from anywhere
        MoneyTools.LoadScales();                    //Load scales (number names like Million, Trillion, ect..) from xml file
        money = MoneyTools.LoadMoney();             //Load saved amount of money from binary file

        //Prepare everything for UI
        ui.UpdateMoneyText(MoneyTools.GetFormatedMoneyText(money), MoneyTools.GetScaleName(money));
        LoadBusinessInfoAndSetupUI();
        LoadManagersAndSetupUI();
        LoadUpgradesAndSetupUI();

        AddMoney(0);                                //Just to activate all listening buttons, waiting for a change
    }