using UnityEngine;
using System.Collections;

public class AltoDash : MonoBehaviour {

	public GameObject player;
	public AudioClip clip;

	// Use this for initialization
	void Start () {
	
		player = GameObject.FindWithTag("Player");

	}
	
	// Update is called once per frame
	void Update () {

	}

	void OnTriggerEnter2D(Collider2D collider){
		if(collider.tag == "Player"){
			player.GetComponent<PlayerController>().dashEnable = true;
			AudioSource.PlayClipAtPoint(clip,player.transform.position);
			Destroy(gameObject);
		}
	}
}
