using UnityEngine;
using System.Collections;

public class WoodScript : MonoBehaviour {

	public GameObject playerREF;

	MummyScript mummyREF;

	// Use this for initialization
	void Start () {
	
		mummyREF = playerREF.GetComponent<MummyScript> ();
	}
	
	// Update is called once per frame
	void Update  () {

		/*if(Physics2D.IsTouching((Collider2D)GetComponent<BoxCollider2D>(), (Collider2D)circleREF))
		{
			if(mummyREF.onFire)
			{
				Destroy(gameObject);
			}
		}*/
	
	}

	void OnCollisionEnter2D(Collision2D col_Info)
	{
		if(col_Info.gameObject.name == "mummy")
		{
			if(mummyREF.onFire)
			{
				Destroy(gameObject);
			}
		}
	}


}
