BGC Tools
Public Member Functions | Protected Member Functions | Private Attributes
BGC.StateMachine.TriggeringState< TTriggerEnum > Class Template Reference
Inheritance diagram for BGC.StateMachine.TriggeringState< TTriggerEnum >:
Inheritance graph
[legend]
Collaboration diagram for BGC.StateMachine.TriggeringState< TTriggerEnum >:
Collaboration graph
[legend]

Public Member Functions

 TriggeringState ()
 Create a coordinating state with the default name More...
 
 TriggeringState (string name)
 Create a coordinate state with a custom name rather than the default More...
 
void SetStateMachineFunctions (IStateTrigger< TTriggerEnum > triggers)
 Receive state machine related functions that give states required behaviour More...
 
- Public Member Functions inherited from BGC.StateMachine.State
 State ()
 Create a state with the default name More...
 
 State (string name)
 Create a state with a custom name rather than the default More...
 
void OnEnter ()
 Called when the state is entered More...
 
void OnExit ()
 Called when the state is exited, before the next state is entered More...
 
virtual void Update ()
 This can be called every frame or whenever for complex states that have behavior on a frame by X basis. More...
 
void SetVerbose (bool isVerbose)
 Set whether the state machine is verbose or not More...
 

Protected Member Functions

void ActivateTrigger (TTriggerEnum key)
 Activate a trigger in the state machine this state is a part of More...
 
- Protected Member Functions inherited from BGC.StateMachine.State
abstract void OnStateEnter ()
 Called when the state is entered More...
 
virtual void OnStateExit ()
 Called when the state is exited before the next state is entered More...
 

Private Attributes

IStateTrigger< TTriggerEnum > stateTriggers
 

Additional Inherited Members

- Protected Attributes inherited from BGC.StateMachine.State
virtual string DefaultName => "State"
 
- Properties inherited from BGC.StateMachine.State
string Name [get, private set]
 Name of the state. This will either be user defined or the default state name depending on the constructor used More...
 

Detailed Description

Type Constraints
TTriggerEnum :Enum 

Definition at line 5 of file TriggeringState.cs.

Constructor & Destructor Documentation

◆ TriggeringState() [1/2]

Create a coordinating state with the default name

Definition at line 13 of file TriggeringState.cs.

13  : base()
14  {
15  }

◆ TriggeringState() [2/2]

BGC.StateMachine.TriggeringState< TTriggerEnum >.TriggeringState ( string  name)
inline

Create a coordinate state with a custom name rather than the default

Definition at line 20 of file TriggeringState.cs.

20  : base(name)
21  {
22  }

Member Function Documentation

◆ ActivateTrigger()

void BGC.StateMachine.TriggeringState< TTriggerEnum >.ActivateTrigger ( TTriggerEnum  key)
protected

Activate a trigger in the state machine this state is a part of

Parameters
key
Returns

◆ SetStateMachineFunctions()

void BGC.StateMachine.TriggeringState< TTriggerEnum >.SetStateMachineFunctions ( IStateTrigger< TTriggerEnum >  triggers)
inline

Receive state machine related functions that give states required behaviour

Definition at line 27 of file TriggeringState.cs.

References BGC.StateMachine.IStateTrigger< TTriggerEnum >.ActivateTrigger().

Referenced by BGC.StateMachine.StateMachine< TBoolEnum, TTriggerEnum >.AddState().

28  {
29  stateTriggers = triggers ?? throw new ArgumentNullException(
30  paramName: nameof(triggers),
31  message: "stateMachine cannot be null.");
32  }
IStateTrigger< TTriggerEnum > stateTriggers
Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ stateTriggers

IStateTrigger<TTriggerEnum> BGC.StateMachine.TriggeringState< TTriggerEnum >.stateTriggers
private

Definition at line 8 of file TriggeringState.cs.


The documentation for this class was generated from the following file: