20 lines
276 B
C#
20 lines
276 B
C#
using UnityEngine;
|
|
|
|
public class light_control : MonoBehaviour
|
|
{
|
|
private float t;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
t += Time.deltaTime;
|
|
if (t > 0.5f)
|
|
{
|
|
GetComponent<Light>().intensity += (0f - GetComponent<Light>().intensity) / 100f;
|
|
}
|
|
}
|
|
}
|