1 using System.Collections;
2 using System.Collections.Generic;
6 public class Cheese : MonoBehaviour
11 public int cheesecount;
13 public bool collected;
17 countText.text = cheesecount.ToString();
20 private void OnTriggerEnter2D(Collider2D collision)
22 if (collision.gameObject.CompareTag("Cheese"))
28 FindObjectOfType<AudioManager>().Play("cheese_plop");
30 collision.gameObject.SetActive(false);
34 public void SetCountText()
36 countText.text = cheesecount.ToString();