| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- 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;
- }
- }
|