Table of Contents

Interface IAIStateMachine

Namespace
FishMMO.Shared.Core
Assembly
FishMMO.Shared.dll

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

BaseAIState

CurrentState

The current AI state.

BaseAIState CurrentState { get; }

Property Value

BaseAIState

IdleState

The state this NPC falls back to when it has nothing to do.

BaseAIState IdleState { get; }

Property Value

BaseAIState

Methods

ChangeState(BaseAIState, List<ICharacter>)

Changes the AI state, optionally providing targets for attacking states.

void ChangeState(BaseAIState newState, List<ICharacter> targets = null)

Parameters

newState BaseAIState

The new state to transition to.

targets List<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()