TopDown Engine  v3.6
MoreMountains.TopDownEngine.AIActionChangeWeapon Class Reference

This action is used to force your character to switch to another weapon. Just drag a weapon prefab into its NewWeapon slot and you're good to go. More...

Inheritance diagram for MoreMountains.TopDownEngine.AIActionChangeWeapon:
MoreMountains.Tools.AIAction

Public Member Functions

override void Initialization ()
 On init we grab our CharacterHandleWeapon ability More...
 
override void PerformAction ()
 On PerformAction we change weapon More...
 
override void OnEnterState ()
 Resets our counter More...
 
- Public Member Functions inherited from MoreMountains.Tools.AIAction
virtual void OnExitState ()
 Describes what happens when the brain exits the state this action is in. Meant to be overridden. More...
 

Public Attributes

Weapon NewWeapon
 the new weapon to equip when that action is performed More...
 
- Public Attributes inherited from MoreMountains.Tools.AIAction
InitializationModes InitializationMode
 
string Label
 a label you can set to organize your AI Actions, not used by anything else More...
 

Protected Member Functions

virtual void ChangeWeapon ()
 Performs the weapon change More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain More...
 

Protected Attributes

CharacterHandleWeapon _characterHandleWeapon
 
int _change = 0
 
- Protected Attributes inherited from MoreMountains.Tools.AIAction
bool _initialized
 
AIBrain _brain
 

Additional Inherited Members

- Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { InitializationModes.EveryTime, InitializationModes.OnlyOnce }
 
- Properties inherited from MoreMountains.Tools.AIAction
virtual bool ActionInProgress [get, set]
 
virtual bool ShouldInitialize [get]
 

Detailed Description

This action is used to force your character to switch to another weapon. Just drag a weapon prefab into its NewWeapon slot and you're good to go.

Member Function Documentation

◆ ChangeWeapon()

virtual void MoreMountains.TopDownEngine.AIActionChangeWeapon.ChangeWeapon ( )
protectedvirtual

Performs the weapon change

◆ Initialization()

override void MoreMountains.TopDownEngine.AIActionChangeWeapon.Initialization ( )
virtual

On init we grab our CharacterHandleWeapon ability

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnEnterState()

override void MoreMountains.TopDownEngine.AIActionChangeWeapon.OnEnterState ( )
virtual

Resets our counter

Reimplemented from MoreMountains.Tools.AIAction.

◆ PerformAction()

override void MoreMountains.TopDownEngine.AIActionChangeWeapon.PerformAction ( )
virtual

On PerformAction we change weapon

Implements MoreMountains.Tools.AIAction.

Member Data Documentation

◆ _change

int MoreMountains.TopDownEngine.AIActionChangeWeapon._change = 0
protected

◆ _characterHandleWeapon

CharacterHandleWeapon MoreMountains.TopDownEngine.AIActionChangeWeapon._characterHandleWeapon
protected

◆ NewWeapon

Weapon MoreMountains.TopDownEngine.AIActionChangeWeapon.NewWeapon

the new weapon to equip when that action is performed


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