Table of Contents

Class ABehaviorState<TState>

Namespace
WitShells.WitActor
[Serializable]
public abstract class ABehaviorState<TState> : IState where TState : Enum

Type Parameters

TState
Inheritance
ABehaviorState<TState>
Implements
Derived
Inherited Members

Constructors

ABehaviorState(Animator, NavMeshAgent, TState)

public ABehaviorState(Animator animator, NavMeshAgent agent, TState initialState)

Parameters

animator Animator
agent NavMeshAgent
initialState TState

Fields

OnStateChanged

public UnityEvent<TState> OnStateChanged

Field Value

UnityEvent<TState>

agent

protected NavMeshAgent agent

Field Value

NavMeshAgent

animator

protected Animator animator

Field Value

Animator

metaTags

public string[] metaTags

Field Value

string[]

state

public TState state

Field Value

TState

Methods

GetMatchScore(string)

public int GetMatchScore(string prompt)

Parameters

prompt string

Returns

int

OnEnter()

Called when the state is entered.

public virtual void OnEnter()

OnExit()

Called when the state is exited.

public virtual void OnExit()

OnTransitionTo(TState)

public virtual void OnTransitionTo(TState newState)

Parameters

newState TState

OnUpdate()

Called every frame while the state is active.

public virtual void OnUpdate()