using UnityEngine;
using System.Collections;

public class PowerPellet : MonoBehaviour {

    public AudioClip sfx;

	void OnTriggerEnter2D(Collider2D co) {
		if (co.tag == "Player")
		{
			//Debug.Log ("Pellet Eaten");

			//Play SoundFX here, add to score, track if PacVan wins, etcetera
            if (sfx != null)
            {
                AudioSource.PlayClipAtPoint(sfx, transform.position);
            }

			GameObject pm = GameObject.Find("PowerManager");
			if(pm != null)
				pm.SendMessage("PowerPellet");

			Destroy(gameObject);
		}
	}
}