using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DebugBowPower : MonoBehaviour { [SerializeField] Image progress; [SerializeField] Text valueText; float value = 0; public static DebugBowPower ins; void Start() { ins = this; } public void Init() { value = 0; valueText.text = value.ToString(); progress.fillAmount = (float) value / 100.0f; } public void PullFinish() { value = 5; valueText.text = value.ToString(); progress.fillAmount = (float) value / 100.0f; } public void DoUpdate() { if (GameMgr.ins.gameOver) { return; } if (value >= 100) { value = 100; return; } value += 0.5f; valueText.text = value.ToString("#0"); progress.fillAmount = (float) value / 100.0f; } public float getPowerPercent() { return (float) value / 100.0f; } }