1 using System.Collections;
2 using System.Collections.Generic;
6 public class CheeseCollection : MonoBehaviour
11 public int cheesecount;
13 private void OnTriggerEnter2D(Collider2D collision)
15 if (collision.gameObject.CompareTag("Cheese"))
19 countText.text = cheesecount.ToString();
21 FindObjectOfType<AudioManager>().Play("cheese_plop");
23 Destroy(collision.gameObject);