bad-piggies-0.1.3-porting/Assets/Scripts/Assembly-CSharp/TimedHide.cs
2024-02-24 22:40:44 -05:00

25 lines
417 B
C#

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