using UnityEngine;
using System.Collections;

public class CameraWireFrame : MonoBehaviour {
	public bool sw;
	public float tiempoinicial,tiempofinal;
	// Use this for initialization
	void Start () {
		//tiempoinicial = tiempofinal;
		sw = false;
	}

	// Update is called once per frame
	void Update () {
		if (sw) {
			tiempoinicial += Time.deltaTime;
			if (tiempoinicial > tiempofinal) {
				sw = false;
				tiempoinicial = 0;
			}
		}
	}
	void OnPreRender (){
		if (sw) {
			GL.wireframe = true;
		}
	}
	public void tiempowire(float tiempo){
		tiempoinicial = 0;
		sw = true;
		tiempofinal = tiempo;
	}
}
