Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == plyr && soal.isInvokeSoal == false)
     {
         if (spesialElenmeyer == true && soal.isInDual == false)
         {
             soal.addCounterElen(1, itemSprite);
             if (soal.currentlevel == 1 || soal.currentlevel == 3)
             {
                 itemSprite.gameObject.SetActive(true);
             }
             elenCounter.Instance.addElenUI();
             StartCoroutine(poolBackItem());
         }
         else if (spesialElenmeyer == false)
         {
             soal.addCounterElen(1, itemSprite);
             if (soal.currentlevel == 1 || soal.currentlevel == 3)
             {
                 itemSprite.gameObject.SetActive(true);
             }
             elenCounter.Instance.addElenUI();
             StartCoroutine(poolBackItem());
         }
     }
 }
Ejemplo n.º 2
0
 private void OnCollisionEnter2D(Collision2D other)
 {
     if (other.collider.tag == plyr)
     {
         soal.addCounterElen(1);
         elenUICounter.addElenUI();
         Destroy(gameObject);
     }
 }