void Update() { if (begunFilling && !pause) { glassFilling.SetBool("Serving", true); glassFilling.SetInteger("BeerSelection", indexBeer); timer -= 0.1f; dragHandler.DraggingOn(); barmanTransform.position = Vector3.MoveTowards(barmanTransform.position, target.position, 13f * Time.deltaTime * 2); if (barmanTransform.position == target.position) { StartAnimations(); } } if (uiMessage) { uiTimer -= Time.deltaTime; if (uiTimer < 0) { uiMessage = false; uiTimer = 2f; spilledTxt.SetActive(false); pause = false; } } if (timer < 0) { stillFilling = false; begunFilling = false; DoneServing(); } else { stillFilling = true; } }