idk L
This commit is contained in:
@@ -7,29 +7,26 @@ public class Cooking : MonoBehaviour
|
|||||||
|
|
||||||
private string[] ingrediens = {"L","Egg"};
|
private string[] ingrediens = {"L","Egg"};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GetIngredients()
|
void GetIngredients()
|
||||||
{
|
{
|
||||||
|
|
||||||
// foreach (GameObject ingredient in currentCollisions) {
|
|
||||||
// Debug.Log(ingredient.name);
|
|
||||||
// }
|
|
||||||
|
|
||||||
return currentCollisions
|
return currentCollisions;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckDishes()
|
void CheckDishes()
|
||||||
{
|
{
|
||||||
if (System.Array.IndexOf(ingrediens, "Egg")!=-1){
|
foreach (GameObject ingredient in currentCollisions) {
|
||||||
print("Egg");
|
|
||||||
|
Debug.Log(ingredient.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
GetIngredients();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Keep track of ingredients going on and off the cooker.
|
// Keep track of ingredients going on and off the cooker.
|
||||||
List <GameObject> currentCollisions = new List <GameObject> ();
|
List <GameObject> currentCollisions = new List <GameObject> ();
|
||||||
@@ -41,4 +38,11 @@ public class Cooking : MonoBehaviour
|
|||||||
currentCollisions.Remove (other.gameObject);
|
currentCollisions.Remove (other.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
GetIngredients();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user