Class ABehaviorState<TState>
[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
animatorAnimatoragentNavMeshAgentinitialStateTState
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
promptstring
Returns
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
newStateTState
OnUpdate()
Called every frame while the state is active.
public virtual void OnUpdate()