Example #1
0
 private void OnTriggerEnter(Collider other)
 {
     //Check to see if the tag on the collider is equal to Enemy
     if (other.tag == "Coin")
     {
         PlayerPrefs.SetInt("gold", PlayerPrefs.GetInt("gold") + 20);
         c_Label.showGold();
         Destroy(other);
     }
 }