28 lines
633 B
C#
28 lines
633 B
C#
using System.Collections;
|
|
using UnityEngine;
|
|
|
|
public class EnemyBurstFire : EnemyBulletPattern
|
|
{
|
|
[SerializeField] private int burstCount;
|
|
[SerializeField] private float burstDelay;
|
|
|
|
protected override void AbilityEffects()
|
|
{
|
|
foreach (ProjectileDirection projectile in projectileDirections)
|
|
{
|
|
StartCoroutine(BurstFire(projectile));
|
|
}
|
|
}
|
|
|
|
private IEnumerator BurstFire(ProjectileDirection moveDirection)
|
|
{
|
|
int currentCount = 0;
|
|
while (currentCount < burstCount)
|
|
{
|
|
//ShootProjectile(moveDirection.projectile, direction);
|
|
currentCount++;
|
|
yield return new WaitForSeconds(burstDelay);
|
|
}
|
|
yield break;
|
|
}
|
|
}
|