Пример #1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag(Tags.FOOD))
     {
         if (currentFoodCount < foodCount)
         {
             Debug.Log("The monster ate food.", this);
             eatingSounds.PlayRandomAudioClip();
             Destroy(other.gameObject);
             monsterScript.RegisterAction(ActionType.DragAndDrop, HotSpotLocation.Teeth);
         }
         if (currentFoodCount >= foodCount)
         {
             minigameManager.CompleteCurrentMinigame();
         }
         currentFoodCount++;
     }
 }