diff --git a/Assets/Scripts/Cooking.cs b/Assets/Scripts/Cooking.cs index e06fa68..d592768 100644 --- a/Assets/Scripts/Cooking.cs +++ b/Assets/Scripts/Cooking.cs @@ -7,29 +7,26 @@ public class Cooking : MonoBehaviour private string[] ingrediens = {"L","Egg"}; - + List GetIngredients() { - // foreach (GameObject ingredient in currentCollisions) { - // Debug.Log(ingredient.name); - // } + return currentCollisions; } void CheckDishes() - { - if (System.Array.IndexOf(ingrediens, "Egg")!=-1){ - print("Egg"); + { + foreach (GameObject ingredient in currentCollisions) { + + Debug.Log(ingredient.name); } + } - void Update() - { - GetIngredients(); - } + // Keep track of ingredients going on and off the cooker. List currentCollisions = new List (); @@ -41,4 +38,11 @@ public class Cooking : MonoBehaviour currentCollisions.Remove (other.gameObject); } + + void Update() + { + GetIngredients(); + } + + }