3 namespace HKI.Core.AI.StateMachine
14 [SerializeField]
AIState StartState = null;
15 [SerializeField]
AIState CurrentState = null;
16 [SerializeField]
AIState RemainInState = null;
18 [HideInInspector]
public float StateTimeElapsed = 0.0f;
20 [HideInInspector]
public Transform ThisTransform = null;
23 bool isAiActive =
false;
28 ThisTransform = transform;
34 if(AIStateControllerContainer != null)
35 AIStateControllerContainer.
Add(
this);
41 if(AIStateControllerContainer != null)
42 AIStateControllerContainer.
Remove(
this);
48 if (!isAiActive || CurrentState == null)
57 this.isAiActive = isAiActive;
59 CurrentState = StartState;
64 if (nextState != RemainInState)
66 CurrentState = nextState;
73 StateTimeElapsed += Time.deltaTime;
75 return (StateTimeElapsed >= duration);
81 StateTimeElapsed = 0.0f;
This is obsolete code it'll be removed later. For now it's still included for exemplary purposes for ...
bool CheckIfCountDownElapsed(float duration)
This is obsolete code it'll be removed later. For now it's still included for exemplary purposes for ...
void TransitionToState(AIState nextState)
void SetupAI(bool isAiActive)
This is obsolete code it'll be removed later. For now it's still included for exemplary purposes for ...
void UpdateState(AIStateController controller)