public void Update() { float money = BabySmileManager.GetMoney(); temMoney = Mathf.Lerp(temMoney, money, smooth * Time.deltaTime); data.text = Mathf.Round(temMoney).ToString(); }
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; } }