void OnTriggerEnter2D(Collider2D other) { Bear bear = other.gameObject.GetComponent <Bear>(); if (bear != null) { bear.AddMouth(); } }
void OnTriggerEnter2D(Collider2D other) { Bear bear = other.gameObject.GetComponent <Bear>(); if (bear != null) { GetComponent <AudioSource>().Play(); bear.AddMouth(); } }