Commit eca0bf12 authored by 15박보승's avatar 15박보승

스킬 쿨타임 UI 구현

parent 5be33402
This diff is collapsed.
......@@ -23,6 +23,11 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
[SerializeField]
private Image weaponUI;
[SerializeField]
private Slider skillUI;
[SerializeField]
private Text skillCooltimeText;
public void UpdateTargetLockedUIs(Vector3[] pos)
{
int tmp, i = 0;
......@@ -92,4 +97,14 @@ public class IngameUIManager : SingletonBehaviour<IngameUIManager>
break;
}
}
public void UpdateSkillUI(float remain, float time)
{
skillUI.value = 1 - remain / time;
if (remain <= 0)
skillCooltimeText.text = "";
else
skillCooltimeText.text = string.Format("{0:F1}", remain);
}
}
......@@ -202,6 +202,7 @@ public class Knife : IWeapon
public void UpdateWeapon()
{
skillTimer -= Time.deltaTime;
IngameUIManager.inst.UpdateSkillUI(skillTimer, skillTimeInterval);
}
private IEnumerator SkillRoutine()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment