ProjectSquareBall/Assets/Scripts/GrowingLight.cs
2024-07-01 21:24:10 +05:30

26 lines
503 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering.Universal;
public class GrowingLight : MonoBehaviour
{
Light2D l;
public float speed = 0.5f;
private void Awake()
{
l = GetComponent<Light2D>();
l.intensity = 0.3f;
}
void Update()
{
if(l.intensity < 1)
{
l.intensity += Time.deltaTime * speed;
}
l.shapeLightFalloffSize += Time.deltaTime * speed;
}
}