Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.name == "Player")
     {
         PlayerStats player = collision.GetComponent <PlayerStats>();
         if (effectName == "DMG+1")
         {
             player.AddDamage();
         }
         else if (effectName == "Health+1")
         {
             player.AddHeartContainer();
         }
         Destroy(gameObject);
     }
     return;
 }