Class StateMachineBrain
This is for controlling non-player controlled characters states and actions.
StateCore are for non-player characters
and AbilityCore are for player controlled characters.
Inheritance
System.Object
StateMachineBrain
Assembly: cs.temp.dll.dll
Syntax
public class StateMachineBrain : MonoBehaviour
Fields
_controller2D
Declaration
protected Controller2D _controller2D
Field Value
Type |
Description |
Controller2D |
|
_states
Declaration
protected List<StateCore> _states
Field Value
ControlledGameObject
Declaration
public GameObject ControlledGameObject
Field Value
Type |
Description |
GameObject |
|
Properties
CurrentState
Declaration
public StateCore CurrentState { get; protected set; }
Property Value
DefaultState
Declaration
public StateCore DefaultState { get; protected set; }
Property Value
PreviousState
Declaration
public StateCore PreviousState { get; protected set; }
Property Value
Methods
ChangeState(StateCore)
Changes the current newState and runs the enter and
exit functions for the appropriate states without doing transition
or decision newState checks. Due note this is called normally after
newState checks, but can be used outside of them to directly bypass them.
Declaration
public void ChangeState(StateCore state)
Parameters
ChangeStateWithCheck(StateCore)
Changes the current newState and runs the enter and
exit functions for the appropriate states after checking
if the newState trying to be changed to can be entered.
Declaration
public void ChangeStateWithCheck(StateCore newState)
Parameters
InitStateBrain()
Declaration
public void InitStateBrain()