Walls + Start Arrow

This commit is contained in:
Crizomb 2025-01-14 13:11:00 +01:00
parent 7da33be977
commit 33467f6cc4
71 changed files with 4255 additions and 81 deletions

View file

@ -0,0 +1,18 @@
using UnityEngine;
public class AttackSkeleton : AttackHandler
{
[SerializeField] private GameObject arrowPrefab;
[SerializeField] private float arrowBaseSpeed;
[SerializeField] private Transform spawnPos;
public override bool Attack()
{
if (_timer > 0) return false;
GameObject arrow = Instantiate(arrowPrefab, spawnPos.position, spawnPos.rotation);
ArrowHandler arrowHandler = arrow.GetComponent<ArrowHandler>();
arrowHandler.LaunchArrow(arrowBaseSpeed * spawnPos.forward);
return true;
}
}