Remove separate states Will contain all states in one type of enemy management script Will use enemy manager to update states of each enemy and spawning
26 lines
573 B
C#
26 lines
573 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Unity.IO.LowLevel.Unsafe;
|
|
using UnityEngine;
|
|
|
|
namespace AI.Base {
|
|
public class EnemyStateManager : MonoBehaviour {
|
|
public static EnemyStateManager Instance;
|
|
public static List<GoblerStateManager> Goblers = new List<GoblerStateManager>();
|
|
public static Action UpdateTick;
|
|
public static Action GizmoTick;
|
|
|
|
public void Awake() {
|
|
Instance = this;
|
|
}
|
|
|
|
public void Update() {
|
|
UpdateTick?.Invoke();
|
|
}
|
|
|
|
public static void OnDrawGizmos() {
|
|
GizmoTick?.Invoke();
|
|
}
|
|
}
|
|
}
|