Exemplo n.º 1
0
 void OnTriggerEnter(Collider col)
 {
     if(onlyOne)
     if (col.gameObject.tag == "PlayerBody")
     {
             onlyOne = false;
         player = col.gameObject;
         playerUnit = col.gameObject.GetComponent<PlayerUnit>();
         playerUnit.powerUp(playerUnit.powerUpPotion);
         applyItem();
         StartCoroutine("effect");
         Destroy(this.gameObject);
     }
 }