using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CaveFeature : MonoBehaviour {

	public Material lightMaterial;
	public Material darkMaterial;
	public SpriteRenderer mr;

	public float echoResultTime = 5;

	  void OnCollisionEnter2D(Collision2D coll) 
	 {
		   if(coll.gameObject.tag == "echo")
		   {
			 //print("Echo!");
			//  SwitchLight();
			// 	Invoke("SwitchDark", echoResultTime);
		 }
	 }

	 void SwitchDark()
	 {
		 mr.material = darkMaterial;
	 }

	 void SwitchLight()
	 {
		 mr.material = lightMaterial;
	 }
}
