// Start is called before the first frame update
    void Start()
    {
        ProductName.text = item.name;
        ProductDesc.text = item.desc;
        BuyButton.GetComponentInChildren <TextMeshProUGUI>().text = MoneySystem.FormatMoney(item.price);

        if (item.image)
        {
            ProductImage.sprite = item.image;
        }
    }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        moneyText.text = MoneySystem.FormatMoney(MoneySystem.GetMoney());

        if (Input.GetButtonDown("Pause"))
        {
            TogglePause();
        }

        DateTime time = DateTime.Now;

        smallHand.rotation = Quaternion.Euler(0, 0, 360f - (0.5f * (60 * time.Hour + time.Minute)));
        bigHand.rotation   = Quaternion.Euler(0, 0, 360f - (6f * time.Minute));
    }
Example #3
0
    // Update is called once per frame
    void Update()
    {
        if (IsBroken)
        {
            if (repairing)
            {
                float curTime = (Time.time - startTime);
                InteractionController.SetUseDisplay(repairTime, curTime);

                if (curTime >= repairTime)
                {
                    IsBroken  = false;
                    repairing = false;
                    InteractionController.FinishRepair();
                }
            }
            else if ((Time.time - brokenTime) >= autoRepairTime)
            {
                RepairManager.Instance.ShowRepairNotification("Auto repaired " + gameObject.name + " for " + MoneySystem.FormatMoney(autoRepairCost));

                IsBroken = false;
                InteractionController.FinishRepair();
                MoneySystem.TakeMoney(autoRepairCost);
            }
        }
    }