Merge branch 'master' of git@83.89.6.135:Let-Him-Cook.git
# Conflicts: # Assets/Scripts/Cooking.cs
This commit is contained in:
@@ -5,6 +5,10 @@ using UnityEngine;
|
|||||||
public class Cooking : MonoBehaviour
|
public class Cooking : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
|
private string[] ingrediens = {"L","Egg"};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GetIngredients()
|
void GetIngredients()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -15,6 +19,12 @@ public class Cooking : MonoBehaviour
|
|||||||
return currentCollisions
|
return currentCollisions
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CheckDishes()
|
||||||
|
{
|
||||||
|
if (System.Array.IndexOf(ingrediens, "Egg")!=-1){
|
||||||
|
print("Egg");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
@@ -25,6 +35,7 @@ public class Cooking : MonoBehaviour
|
|||||||
List <GameObject> currentCollisions = new List <GameObject> ();
|
List <GameObject> currentCollisions = new List <GameObject> ();
|
||||||
private void OnTriggerEnter2D(Collider2D other) {
|
private void OnTriggerEnter2D(Collider2D other) {
|
||||||
currentCollisions.Add (other.gameObject);
|
currentCollisions.Add (other.gameObject);
|
||||||
|
CheckDishes();
|
||||||
}
|
}
|
||||||
private void OnTriggerExit2D(Collider2D other) {
|
private void OnTriggerExit2D(Collider2D other) {
|
||||||
currentCollisions.Remove (other.gameObject);
|
currentCollisions.Remove (other.gameObject);
|
||||||
|
|||||||
Reference in New Issue
Block a user