Пример #1
0
 public bool Interact()
 {
     if (TopObject != null && TopObject is Ingredient)
     {
         Ingredient ingr     = TopObject as Ingredient;
         bool       chopping = ingr.Chopp(ProgressBar);
         if (chopping && !audioSource.isPlaying)
         {
             audioSource.clip  = ChopClip;
             audioSource.pitch = 4;
             audioSource.Play();
         }
         return(chopping);
     }
     return(false);
 }