Interface IAIStateMachine
Interface for AI state management — querying and transitioning between AI states. Separated from IAIController to satisfy ISP: consumers that only need state transitions can depend on this smaller contract.
public interface IAIStateMachine : ICharacterBehaviour
- Inherited Members
Properties
AttackingState
The state this NPC uses for combat, or null when it cannot fight.
BaseAIState AttackingState { get; }
Property Value
CurrentState
The current AI state.
BaseAIState CurrentState { get; }
Property Value
IdleState
The state this NPC falls back to when it has nothing to do.
BaseAIState IdleState { get; }
Property Value
Methods
ChangeState(BaseAIState, List<ICharacter>)
Changes the AI state, optionally providing targets for attacking states.
void ChangeState(BaseAIState newState, List<ICharacter> targets = null)
Parameters
newStateBaseAIStateThe new state to transition to.
targetsList<ICharacter>Optional list of targets for attacking states.
TransitionToIdleState()
Transitions to the idle state.
void TransitionToIdleState()
TransitionToRandomMovementState()
Transitions to a random movement state from the available movement states.
void TransitionToRandomMovementState()