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
|
||||
{
|
||||
|
||||
private string[] ingrediens = {"L","Egg"};
|
||||
|
||||
|
||||
|
||||
void GetIngredients()
|
||||
{
|
||||
|
||||
@@ -15,6 +19,12 @@ public class Cooking : MonoBehaviour
|
||||
return currentCollisions
|
||||
}
|
||||
|
||||
void CheckDishes()
|
||||
{
|
||||
if (System.Array.IndexOf(ingrediens, "Egg")!=-1){
|
||||
print("Egg");
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
@@ -25,6 +35,7 @@ public class Cooking : MonoBehaviour
|
||||
List <GameObject> currentCollisions = new List <GameObject> ();
|
||||
private void OnTriggerEnter2D(Collider2D other) {
|
||||
currentCollisions.Add (other.gameObject);
|
||||
CheckDishes();
|
||||
}
|
||||
private void OnTriggerExit2D(Collider2D other) {
|
||||
currentCollisions.Remove (other.gameObject);
|
||||
|
||||
Reference in New Issue
Block a user