This commit is contained in:
김도환
2026-05-10 02:13:54 +09:00
parent e8ce7eb653
commit ee05d6eda9
23 changed files with 549 additions and 148 deletions

View File

@@ -8,11 +8,13 @@ namespace Unicorn.Player
protected override void OnDamaged(DamageInfo info)
{
Debug.Log(health);
base.OnDamaged(info);
}
protected override void OnDeath()
{
Debug.Log("주것서영.");
base.OnDeath();
}
}
}

View File

@@ -9,6 +9,7 @@ namespace Unicorn.Player
{
public GameObject attackHitbox;
private UnicornInputSystem _unicornInput;
private bool _attackAvailable = true;
private void Start()
{
_unicornInput = UnicornInput.Unicorn;
@@ -22,14 +23,18 @@ namespace Unicorn.Player
private void Attack(InputAction.CallbackContext obj)
{
if (!_attackAvailable) return;
StartCoroutine(OnAttack());
}
private IEnumerator OnAttack()
{
_attackAvailable = false;
attackHitbox.SetActive(true);
yield return new WaitForSeconds(0.5f);
attackHitbox.SetActive(false);
yield return new WaitForSeconds(0.1f);
_attackAvailable = true;
}
}
}