private void OnCollisionEnter2D(Collision2D collision) { if (collision.transform.tag == "Player" && player.transform.position.y > transform.position.y) { MySoundController.PlaySound("Shrinking"); StopAllCoroutines(); StartCoroutine(SetSize(0)); } }
private void OnCollisionExit2D(Collision2D collision) { if (collision.transform.tag == "Player") { MySoundController.PlaySound("Resetting"); StopAllCoroutines(); StartCoroutine(SetSize(1)); } }
//public AudioSource scoreCount,bgSound ; void Start() { Static = this; }