void Update()
{
if (Input.GetKey(KeyCode.Alpha1))
{
if (s1_CD >= 3)
{
facing = moveController.GetFacing();
s1 = Instantiate(skill1, transform.position, transform.rotation) as SkillOld;
s1.Init(facing);
s1_CD = 0;
}
//else
//play error sound
}
if (Input.GetKey(KeyCode.Alpha2))
{
if (s2_CD >= 3)
{
facing = moveController.GetFacing();
s2 = Instantiate(skill2, transform.position, transform.rotation) as SkillOld;
s2.Init(facing);
s2_CD = 0;
}
}
if (Input.GetKey(KeyCode.Alpha3))
{
if (s3_CD >= 5)
{
facing = moveController.GetFacing();
s3 = Instantiate(skill3, transform.position, transform.rotation) as SkillOld;
s3.Init(facing);
s3_CD = 0;
}
}
s1_CD += Time.deltaTime;
s2_CD += Time.deltaTime;
s3_CD += Time.deltaTime;
s4_CD += Time.deltaTime;
s5_CD += Time.deltaTime;
}