예제 #1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Coin")
     {
         Destroy(other.gameObject);
         coinsCount       += 1;
         coinsCounter.text = coinsCount.ToString();
     }
     if (other.gameObject.tag == "obstacle")
     {
         rg.PauseLevel();
         coinsCounter.text = "You Die";
     }
 }