void OnTriggerEnter2D(Collider2D hitInfo) { if (hitInfo.name == "Ball") { var wallName = transform.name; GameMngr.Score(wallName); hitInfo.gameObject.SendMessage("ResetBallTimer"); } }
void OnTriggerEnter2D(Collider2D hitInfo) { if (hitInfo.name == "Ball") { var wallName = transform.name; GameMngr.Score(wallName); hitInfo.gameObject.SendMessage("ResetBallTimer"); audioSource = GetComponent <AudioSource>(); audioSource.clip = scoreSound; audioSource.Play(); } }