29 lines
411 B
C#
29 lines
411 B
C#
![]() |
using UnityEngine;
|
|||
|
namespace G
|
|||
|
{
|
|||
|
public class Delay_extraEf : MonoBehaviour
|
|||
|
{
|
|||
|
private float _delay;
|
|||
|
|
|||
|
private void Start()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
private void OnEnable()
|
|||
|
{
|
|||
|
this.GetComponent<Animation>().Play();
|
|||
|
_delay = 3f;
|
|||
|
}
|
|||
|
|
|||
|
private void Update()
|
|||
|
{
|
|||
|
_delay -= Time.deltaTime;
|
|||
|
if (_delay <= 0f)
|
|||
|
{
|
|||
|
this.gameObject.SetActive(false);
|
|||
|
this.GetComponent<Animation>().Stop();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|