Example #1
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.gameObject.tag == "Item")
     {
         Debug.Log("get");
         cct.AddCount(1);
         counter += 1;
     }
 }
 //コイン獲得
 void OnTriggerEnter2D(Collider2D col)
 {
     //通常コイン
     if (col.gameObject.tag == "Item")
     {
         cct.AddCount(1);
         //counter += 1;
         weather.addSaving += 0.5f;
         audioSource.clip   = coinSE;
         audioSource.Play();
     }
     //大コイン
     if (col.gameObject.tag == "Item2")
     {
         Debug.Log("get");
         cct.AddCount(10);
         //counter += 10;
         audioSource.clip = coinSE;
         audioSource.Play();
     }
 }
Example #3
0
 //コイン加算
 public virtual void GetCoin()
 {
     cct.AddCount(1);
 }