public class TestSkillCDTime : MonoBehaviour
{
public Text TextTime;
public Image ImageSkillBG;
private float _T = 6;
private bool _Is_Skill1 = false;
private KeyCode kc;
void Start ()
{
}//end_Start
void Update ()
{
if (Input.GetKeyDown(KeyCode.Alpha1) && !_Is_Skill1)
{
_Is_Skill1 = true;
}
if (_Is_Skill1)
{
_T -= Time.deltaTime;
if (_T <= 0)
{
_T = 5;
_Is_Skill1 = false;
}
TextTime.text = ((int)_T).ToString();
ImageSkillBG.fillAmount = _T / 5;
}
}//end_Update
void Attack()
{
}
}