17 lines
541 B
C#
17 lines
541 B
C#
using UnityEngine;
|
|
|
|
public class BossMovesToARandomPositionForNoReason : EnemyAbility
|
|
{
|
|
//i hope you like the script name
|
|
//because the bosses in touhou do this
|
|
//anyways
|
|
[SerializeField] private Enemy thisEnemy;
|
|
protected override void AbilityEffects()
|
|
{
|
|
StopCoroutine(thisEnemy.currentMovementRoutine);
|
|
Vector3 newPosition = WaveManager.instance.GetRandomEnemyPoint();
|
|
thisEnemy.originalPosition = newPosition;
|
|
StartCoroutine(thisEnemy.MoveToPosition(thisEnemy.transform.position,
|
|
newPosition, thisEnemy.moveSpeed));
|
|
}
|
|
}
|