![]() |
Corgi Engine v9.3
|
This simple action lets you swap the brain of an AI at runtime, for a new brain, specified in the inspector More...
Public Member Functions | |
override void | Initialization () |
On init, we grab and store our Character More... | |
override void | PerformAction () |
On PerformAction we swap our brain More... | |
![]() | |
virtual void | OnEnterState () |
Describes what happens when the brain enters the state this action is in. Meant to be overridden. More... | |
virtual void | OnExitState () |
Describes what happens when the brain exits the state this action is in. Meant to be overridden. More... | |
Public Attributes | |
AIBrain | NewAIBrain |
the brain to replace the Character's one with More... | |
bool | KeepTarget = false |
if this is true, the original brain's Target will be passed to the new brain More... | |
![]() | |
InitializationModes | InitializationMode |
whether initialization should happen only once, or every time the brain is reset More... | |
string | Label |
a label you can set to organize your AI Actions, not used by anything else More... | |
Protected Member Functions | |
virtual void | SwapBrain () |
Disables the old brain, swaps it with a new one and enables it More... | |
![]() | |
virtual void | Awake () |
On Awake we grab our AIBrain More... | |
Protected Attributes | |
Character | _character |
Transform | _oldTarget |
![]() | |
bool | _initialized |
AIBrain | _brain |
Additional Inherited Members | |
![]() | |
enum | InitializationModes { EveryTime , OnlyOnce } |
![]() | |
virtual bool | ActionInProgress [getset] |
virtual bool | ShouldInitialize [get] |
This simple action lets you swap the brain of an AI at runtime, for a new brain, specified in the inspector
|
virtual |
On init, we grab and store our Character
Reimplemented from MoreMountains.Tools.AIAction.
|
virtual |
On PerformAction we swap our brain
Implements MoreMountains.Tools.AIAction.
|
protectedvirtual |
Disables the old brain, swaps it with a new one and enables it
|
protected |
|
protected |
bool MoreMountains.CorgiEngine.AIActionSwapBrain.KeepTarget = false |
if this is true, the original brain's Target will be passed to the new brain
AIBrain MoreMountains.CorgiEngine.AIActionSwapBrain.NewAIBrain |
the brain to replace the Character's one with