using UnityEngine;
using System.Collections;
public class light : MonoBehaviour {
public GameObject source1;
public Shader shader1 = Shader.Find("Diffuse");
public Shader shader2 = Shader.Find("Self-Illumin/Diffuse");
private float timeStart = 0.0f;
public float timer = 30.0f;
void Update ()
{
if (source1 & Time.time - timeStart < timer)
renderer.material.shader = shader2;
else
renderer.material.shader = shader1;
}
}