备份CatanBuilding瘦身独立工程
This commit is contained in:
26
Assets/Scripts/UI/RewardPopup/RewardPopupBar.cs
Normal file
26
Assets/Scripts/UI/RewardPopup/RewardPopupBar.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user