Exemple #1
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     if (collider.gameObject.name == playerTag && isAdd == true)
     {
         this.isAdd = false;
         count.AddCoin();
         Destroy(this.gameObject);
         print("Coint get");
     }
 }
Exemple #2
0
 void GetCoin()
 {
     if (isAdd == true)
     {
         isAdd = false;
         count.AddCoin();
         //this.director.GetComponent<UIController1_2>().AddCoin();
         Destroy(this.content);
         print("coutn");
     }
 }