33 lines
961 B
C#
33 lines
961 B
C#
using Invector.vCharacterController.AI.FSMBehaviour;
|
|
using UnityEngine;
|
|
|
|
namespace DemonBoss.Summoner
|
|
{
|
|
/// <summary>
|
|
/// FSM Decision: true when summoner is NOT spawning (spawn sequence finished)
|
|
/// </summary>
|
|
[CreateAssetMenu(menuName = "Invector/FSM/Decisions/Summoner/Is Spawning Complete")]
|
|
public class DEC_IsSpawningComplete : vStateDecision
|
|
{
|
|
public override string categoryName => "Summoner";
|
|
public override string defaultName => "Is Spawning Complete";
|
|
|
|
[Header("Debug")]
|
|
public bool enableDebug = false;
|
|
|
|
public override bool Decide(vIFSMBehaviourController fsmBehaviour)
|
|
{
|
|
var summoner = fsmBehaviour.gameObject.GetComponent<SummonerAI>();
|
|
if (summoner == null)
|
|
{
|
|
if (enableDebug) Debug.LogWarning("[DEC_IsSpawningComplete] No SummonerAI component found!");
|
|
return false;
|
|
}
|
|
|
|
bool done = !summoner.IsSpawning;
|
|
if (enableDebug) Debug.Log($"[DEC_IsSpawningComplete] done={done}");
|
|
return done;
|
|
}
|
|
}
|
|
}
|