Added nutrionional value

This commit is contained in:
2024-03-12 13:50:20 +01:00
parent 298949332d
commit c889a936f7
7 changed files with 643 additions and 15 deletions

View File

@@ -4,29 +4,16 @@ using UnityEngine;
public class Cooking : MonoBehaviour
{
private string[] ingrediens = {"L","Egg"};
List <GameObject> GetIngredients()
{
return currentCollisions;
}
void CheckDishes()
{
foreach (GameObject ingredient in currentCollisions) {
Debug.Log(ingredient.name);
Debug.Log(ingredient.GetComponent<Ingredient>().NutritionalValue);
}
}
// Keep track of ingredients going on and off the cooker.
List <GameObject> currentCollisions = new List <GameObject> ();
@@ -44,5 +31,10 @@ public class Cooking : MonoBehaviour
GetIngredients();
}
List <GameObject> GetIngredients()
{
return currentCollisions;
}
}

View File

@@ -9,6 +9,7 @@ public class Ingredient : MonoBehaviour
Vector3 mousePosition;
new public Transform transform;
public List <GameObject> IngredientIn;
public int NutritionalValue;
bool isMoving = false;
//public GameObject table;
void Start()