Exemplo n.º 1
0
 public void Hit(float f)
 {
     AudioManagerB.PlaySound("hit");
     golfball.AddForce(transform.forward * f, ForceMode.Impulse);
     nStrokes++;
     strokesT.text = nStrokes.ToString();
     StartCoroutine(go());
 }
Exemplo n.º 2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.tag == "hole")
     {
         Debug.Log("HOLEE");
         //nStrokes = 0;
         strokesT.text = nStrokes.ToString();
         AudioManagerB.PlaySound("hole");
         holeEffect.Play();
         LevelManager.instance.nextLevel();
     }
     if (other.tag == "end")
     {
         UIManager.instance.endGame(nStrokes);
         //nStrokes = 0;
     }
 }