OldBlueWater/BlueWater/Assets/02.Scripts/Ui/SkillUi.cs
NTG 27267fbeeb Closes #150
+ 주인공 스킬(검의 왈츠)가 추가되었습니다.
  ㄴ 검의 왈츠 애니메이션이 추가되었습니다.
  ㄴ 스킬에 맞게 UI를 표시합니다.
+ 주인공이 더 이상 공격 중에 이동할 수 없습니다.
+ 새로운 스킬 시스템으로 변경하였습니다.
+ Combat씬에서 사용할 Camera, Ui를 추가하였습니다.
+ Input Action이 변경 되었습니다. (UseSkill => ActivateMainSkill)
+ Idamameable 인터페이스에 GetCurrentHp() 기능이 추가되었습니다.
  ㄴ 변경에 따라 기존 스크립트들에 추가되었습니다.
2024-01-29 00:46:56 +09:00

41 lines
1.0 KiB
C#

using System;
using System.Collections;
using Doozy.Runtime.UIManager.Containers;
using UnityEngine;
using UnityEngine.UI;
// ReSharper disable once CheckNamespace
namespace BlueWaterProject
{
[Serializable]
public class SkillUi : MonoBehaviour
{
[field: SerializeField] public GameObject Obj { get; set; }
[field: SerializeField] public Image Icon { get; set; }
[field: SerializeField] public Image Fill { get; set; }
[field: SerializeField] public UIView Fade { get; set; }
public void Cooldown(float waitTime)
{
StartCoroutine(CooldownCoroutine(waitTime));
}
private void Start()
{
Fill.fillAmount = 0f;
}
public IEnumerator CooldownCoroutine(float waitTime)
{
Fill.fillAmount = 1f;
while (Fill.fillAmount > 0f)
{
Fill.fillAmount -= Time.deltaTime / waitTime;
yield return null;
}
Fade.Show();
}
}
}