using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DebugBowPower : MonoBehaviour { [SerializeField] Image progress; [SerializeField] Text valueText; int 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 = 20; valueText.text = value.ToString(); progress.fillAmount = (float) value / 100.0f; } public void DoUpdate() { if (value >= 100) return; value++; valueText.text = value.ToString(); progress.fillAmount = (float) value / 100.0f; } public float getPowerPercent() { return (float) value / 100.0f; } }