private IEnumerator Interact() { CanInteractWith = false; AudioManager.PlaySound(SFXSound); Image.sprite = LastSprite = finalSprite; _progressBarController.Animate(time); yield return(new WaitForSeconds(time)); HasContent = true; CanInteractWith = true; }
private IEnumerator Interact(ToppingInteractiveElement topping) { CanInteractWith = false; SetContentSprite(topping.GetDefaultSprite); AudioManager.PlaySound(SFXSound); ToppingType = topping.GetToppingType; _lastContentSprite = _toppingCutSprite = topping.GetCutSprite; ToppingFinalSprite = topping.GetFinalSprite; _progressBarController.Animate(time); yield return(new WaitForSeconds(time)); SetContentSprite(_toppingCutSprite); HasContent = true; CanInteractWith = true; }