using UnityEngine;
using System.Collections;

public class DarkWoodScript : MonoBehaviour {

	public GameObject playerREF;


	public GameObject firePSO;
	ParticleSystem fire_PS;
	MummyScript mummyREF;
	
	// Use this for initialization
	void Start () {
		fire_PS = firePSO.GetComponent<ParticleSystem> ();
		mummyREF = playerREF.GetComponent<MummyScript> ();
	}
	

	void Update  () {
	
		
	}
	
	void OnCollisionEnter2D(Collision2D col_Info)
	{
		if(col_Info.gameObject.name == "mummy")
		{
			if(mummyREF.onFire)
			{
				fire_PS.Play();
				Destroy(gameObject, 3.0f);
			}
		}
	}
}
