using UnityEngine;
using System.Collections;

public class Platform : MonoBehaviour {

	public bool deadly;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if (deadly)
			renderer.material.color = Color.magenta;
		else
			renderer.material.color = Color.cyan;
	}

	void OnCollisionStay(Collision c) {
		if (deadly) GameObject.FindGameObjectWithTag("Player").GetComponent<MeController> ().Die ();
	}
}
