Added nutrionional value
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user