Пример #1
0
    public void Update()
    {
        float money = BabySmileManager.GetMoney();

        temMoney  = Mathf.Lerp(temMoney, money, smooth * Time.deltaTime);
        data.text = Mathf.Round(temMoney).ToString();
    }
Пример #2
0
    void Update()
    {
        int itemid = GetComponent <SceneItem>().id;

        if (price > BabySmileManager.GetMoney())
        {
            BabySmileManager.SetItemState(itemid, 1);
            //表现层改状态为缺货
            GetComponent <SceneItem>().Status = 1;
        }
        else
        {
            BabySmileManager.SetItemState(itemid, 2);
            //表现层改状态为有货
            GetComponent <SceneItem>().Status = 2;
        }
    }