add all mechanics

This commit is contained in:
Sylvia 2026-07-13 17:46:02 -07:00
parent 87383d5b8c
commit 0e2a7cc7c3
434 changed files with 238349 additions and 2092 deletions

View file

@ -13,6 +13,7 @@ public class EnemyAbility : Ability
public override bool TryAbility()
{
WaveManager.instance.audioSource.PlayOneShot(abilitySound, volume);
if (willLookAtPlayer)
{
direction = WaveManager.instance.GetRandomPlayerPoint();
@ -20,9 +21,13 @@ public class EnemyAbility : Ability
}
return base.TryAbility();
}
public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed)
public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed, Transform bulletParent = null)
{
Projectile newProjectile = Instantiate(projectile, origin.position, Quaternion.identity);
if (bulletParent)
{
newProjectile.transform.SetParent(bulletParent);
}
Vector3 projectileDirection = location;
if (aimed)
{