11111
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Stary.Evo;
|
||||
using Stary.Evo.AudioCore;
|
||||
using Stary.Evo.InformationSave;
|
||||
using Stary.Evo.UIFarme;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using YooAsset;
|
||||
|
||||
namespace Main
|
||||
{
|
||||
public class ProgressBarPanel : MonoBehaviour
|
||||
{
|
||||
private Image _fill;
|
||||
private Text _fillText;
|
||||
private Text _fillMessage;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_fill = this.transform.Find("Fill").GetComponent<Image>();
|
||||
_fillText = _fill.transform.Find("FillText").GetComponent<Text>();
|
||||
_fillMessage = _fill.transform.Find("FillMessage").GetComponent<Text>();
|
||||
_fill.fillAmount = 0;
|
||||
_fillText.text = "0%";
|
||||
}
|
||||
|
||||
|
||||
public async void SetProgressBarValue(string message, float value)
|
||||
{
|
||||
this.gameObject.SetActive(true);
|
||||
_fill.fillAmount = value;
|
||||
_fillMessage.text = message;
|
||||
_fillText.text = $"{value:P0}";
|
||||
if (value >= 1)
|
||||
{
|
||||
this.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1795353bee11314b950ef806ab8458f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user