// Update is called once per frame void Update() { float currentSize = (float)(depotBehaviour.getCurrentSize()) / depotBehaviour.getSize(); if (currentSize != bar.fillAmount) { bar.fillAmount = Mathf.MoveTowards(bar.fillAmount, currentSize, Time.deltaTime * 0.8f); } }
// Update is called once per frame void Update() { stats.text = depotABehaviour.getCurrentSize().ToString() + "/" + depotABehaviour.getSize().ToString(); }