Ejemplo n.º 1
0
        public override void Interact(GameObject player, PickUp item)
        {
            isPouring      = true;
            fillingTankard = item as Tankard;
            Debug.Assert(fillingTankard != null);

            MovePerfectPourArea();
            StartCoroutine(PouringBeer());

            pouringPlayer = player.GetComponent <PlayerMovement>();
            pouringPlayer.BlockMovement();
        }
Ejemplo n.º 2
0
        private void ResetPouring()
        {
            if (!isPouring)
            {
                return;
            }

            pouringProgress = 0;
            isPouring       = false;
            fillingTankard  = null;

            fillProgressBar.UpdateProgress(fillPortion * beerAmount);
            if (beerAmount > showFillThreshold)
            {
                fillProgressBar.Hide();
            }

            pourProgressBar.Hide();
            perfectProgressIndicator.gameObject.SetActive(false);

            pourSoundHandle?.FadeOutAndStop(0.2f);
            pouringPlayer.UnblockMovement();
            pouringPlayer = null;
        }