using UnityEngine;
using System.Collections;

public class PowerUp : MonoBehaviour 
{
    public ParticleSystem Explosion = null;

    void OnTriggerEnter2D(Collider2D collider)
    {
        if (collider.gameObject.tag.Equals("Player"))
        {
            if (Explosion != null)
            {
                GameObject.Instantiate(Explosion, transform.position, transform.rotation);
            }

            Destroy(this.gameObject);
        }
    }
	
}
