Unity Point Light 定时器 闪亮效果~

Unity Point Light 定时器 闪亮效果~_第1张图片
Untitled20170511165722.gif
Unity Point Light 定时器 闪亮效果~_第2张图片
3DD711F3-6A97-4C26-BC99-0B5EE0FD629C.png

timerControl 代码:

public class timerControl : MonoBehaviour {
    private bool isClose;

    // Use this for initialization
    void Start () {
        float value = Random.Range (0.1f, 1.0f);
        InvokeRepeating ("setupLight",1,value);
    }
    
    // Update is called once per frame
    void Update () {
        
    }

    void setupLight() {
        Light light = GetComponent ();
        light.enabled = isClose;
        isClose = !isClose;
    }
}

把这个脚本放到各个 Point Light 对象上~~~

你可能感兴趣的:(Unity Point Light 定时器 闪亮效果~)