rise-and-swine/Assets/Scripts/Assembly-CSharp/TimedHide.cs
2023-02-25 23:04:03 -05:00

26 lines
492 B
C#

using System.Collections;
using UnityEngine;
public class TimedHide : MonoBehaviour
{
public void Show()
{
base.GetComponent<Renderer>().enabled = true;
base.StartCoroutine(this.HideCountdown());
}
private void Start()
{
base.StartCoroutine(this.HideCountdown());
}
private IEnumerator HideCountdown()
{
yield return new WaitForSeconds(this.lifeTime);
base.GetComponent<Renderer>().enabled = false;
yield break;
}
[SerializeField]
private float lifeTime = 1f;
}