Esempio n. 1
0
 void OnTriggerEnter2D(Collider2D hitInfo)
 {
     if (hitInfo.name == "Ball")
     {
         var wallName = transform.name;
         GameMngr.Score(wallName);
         hitInfo.gameObject.SendMessage("ResetBallTimer");
     }
 }
Esempio n. 2
0
    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();
        }
    }