Summoner
This commit is contained in:
32
Assets/AI/_Summoner/DEC_IsSpawningComplete.cs
Normal file
32
Assets/AI/_Summoner/DEC_IsSpawningComplete.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user