the AI brain is responsible from going from one state to the other based on the defined transitions. It's basically just a collection of states, and it's where you'll link all the actions, decisions, states and transitions together.
More...
|
virtual void | TransitionToState (string newStateName) |
| Transitions to the specified state, trigger exit and enter states events More...
|
|
the AI brain is responsible from going from one state to the other based on the defined transitions. It's basically just a collection of states, and it's where you'll link all the actions, decisions, states and transitions together.
◆ Awake()
virtual void MoreMountains.Tools.AIBrain.Awake |
( |
| ) |
|
|
protectedvirtual |
On awake we set our brain for all states
◆ FindState()
AIState MoreMountains.Tools.AIBrain.FindState |
( |
string |
stateName | ) |
|
|
protected |
Returns a state based on the specified state name
- Parameters
-
- Returns
◆ InitializeDecisions()
virtual void MoreMountains.Tools.AIBrain.InitializeDecisions |
( |
| ) |
|
|
protectedvirtual |
Initializes all decisions
◆ OnExitState()
virtual void MoreMountains.Tools.AIBrain.OnExitState |
( |
| ) |
|
|
protectedvirtual |
When exiting a state we reset our time counter
◆ Start()
virtual void MoreMountains.Tools.AIBrain.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we set our first state
◆ StoreLastKnownPosition()
virtual void MoreMountains.Tools.AIBrain.StoreLastKnownPosition |
( |
| ) |
|
|
protectedvirtual |
Stores the last known position of the target
◆ TransitionToState()
virtual void MoreMountains.Tools.AIBrain.TransitionToState |
( |
string |
newStateName | ) |
|
|
virtual |
Transitions to the specified state, trigger exit and enter states events
- Parameters
-
◆ Update()
virtual void MoreMountains.Tools.AIBrain.Update |
( |
| ) |
|
|
protectedvirtual |
Every frame we update our current state
◆ _decisions
AIDecision [] MoreMountains.Tools.AIBrain._decisions |
|
protected |
◆ _lastActionsUpdate
float MoreMountains.Tools.AIBrain._lastActionsUpdate = 0f |
|
protected |
◆ _lastDecisionsUpdate
float MoreMountains.Tools.AIBrain._lastDecisionsUpdate = 0f |
|
protected |
◆ _lastKnownTargetPosition
Vector3 MoreMountains.Tools.AIBrain._lastKnownTargetPosition = Vector3.zero |
the last known world position of the target
◆ ActionsFrequency
float MoreMountains.Tools.AIBrain.ActionsFrequency = 0f |
the frequency (in seconds) at which to perform actions (lower values : higher frequency, high values : lower frequency but better performance)
◆ BrainActive
bool MoreMountains.Tools.AIBrain.BrainActive = true |
whether or not this brain is active
◆ DecisionFrequency
float MoreMountains.Tools.AIBrain.DecisionFrequency = 0f |
the frequency (in seconds) at which to evaluate decisions
◆ States
List<AIState> MoreMountains.Tools.AIBrain.States |
◆ Target
Transform MoreMountains.Tools.AIBrain.Target |
◆ TimeInThisState
float MoreMountains.Tools.AIBrain.TimeInThisState |
the time we've spent in the current state
◆ CurrentState
AIState MoreMountains.Tools.AIBrain.CurrentState |
|
getprotected set |
this brain's current state
The documentation for this class was generated from the following file:
- F:/Github/Store/MMFeedbacksStore/Assets/MMFeedbacks/MMTools/Tools/AI/AIBrain.cs