This commit is contained in:
2024-04-27 14:31:39 +02:00
parent 54378a55ec
commit 8c5690e351
2 changed files with 2 additions and 1 deletions

View File

@@ -143,6 +143,7 @@ public class Cooking : MonoBehaviour
// 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>();
private void OnTriggerEnter2D(Collider2D other) { private void OnTriggerEnter2D(Collider2D other) {
currentCollisions.Add (other.gameObject); currentCollisions.Add (other.gameObject);
} }

View File

@@ -23,7 +23,7 @@ public class Ingredient : MonoBehaviour
if (isMoving) if (isMoving)
{ {
Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
transform.position = new Vector3 (mousePosition.x, mousePosition.y, transform.position.z); transform.position = mousePosition;
} }
} }