Exemplo n.º 1
0
    void UpdateAcctButton(GUIBase_Button button, ref AccountInfo acct)
    {
        GUIBase_Label[] labels = button.GetComponentsInChildren <GUIBase_Label>();
        foreach (var label in labels)
        {
            switch (label.name)
            {
            case "Time_Name":
                SetTimeLabel(label, ref acct);
                break;

            case "Price":
                SetPriceValue(label, ref acct);
                break;

            case "Save":
                SetSaveValue(label, ref acct);
                break;

            case "Discount":
                SetDiscount(label, ref acct);
                break;

            default:
                break;
            }
        }

        GUIBase_Number[] numbers = button.GetComponentsInChildren <GUIBase_Number>();
        foreach (var number in numbers)
        {
            switch (number.name)
            {
            case "Time_Value":
                SetTimeValue(number, ref acct);
                break;

            default:
                break;
            }
        }

        //button.SetDisabled(acct.RealPrice > ShopDataBridge.Instance.PlayerGold ? true : false);
    }