18 lines
435 B
C#
18 lines
435 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Light : MonoBehaviour {
|
|
|
|
[SerializeField, Range(0, 1)] float animationDuration = .5f;
|
|
|
|
// Start is called before the first frame update
|
|
void OnEnable(){
|
|
StartCoroutine(Disable());
|
|
}
|
|
|
|
IEnumerator Disable(){
|
|
yield return new WaitForSeconds(animationDuration);
|
|
gameObject.SetActive(false);
|
|
}
|
|
}
|