using UnityEngine;
using System.Collections;

public class LightBlinking : MonoBehaviour {

    // Use this for initialization
    public float duration = 1.0F;
    void Start()
    {
        
    }
    void Update()
    {
        float phi = Time.time / duration * 2 * Mathf.PI;
        float amplitude = Mathf.Cos(phi) * 0.5F + 0.5F;
        GetComponent<Light>().intensity = amplitude;
    }


}

