Version: 5.5
public float range ;

Description

Диапазон(размер) источника света

See Also: Light component.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public float duration = 3.0F; public float originalRange; public Light lt; void Start() { lt = GetComponent<Light>(); originalRange = lt.range; } void Update() { float amplitude = Mathf.PingPong(Time.time, duration); amplitude = amplitude / duration * 0.5F + 0.5F; lt.range = originalRange * amplitude; } }