init
This commit is contained in:
commit
3b4c6e0ec6
506 changed files with 434142 additions and 0 deletions
18
Assets/Scripts/Light.cs
Normal file
18
Assets/Scripts/Light.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
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);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue