Files
back_cantanBuilding/Assets/Scripts/UI/RewardPopup/RewardPopupBar.cs
2026-05-26 16:15:54 +08:00

27 lines
526 B
C#

using UnityEngine;
using UnityEngine.UI;
public class RewardPopupBar : MonoBehaviour
{
public Image bar;
public GameObject receive;
public float barTime = 3f;
public bool isAutoClose = false;
protected void AutoClose()
{
ShowBar();
if (isAutoClose)
{
StartCoroutine("AutoCloseCoroutine");
}
}
void ShowBar()
{
bar.gameObject.SetActive(isAutoClose);
}
protected virtual void OnDisable()
{
StopAllCoroutines();
}
}