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

An AIACtion used to aim any object in the direction of the AI's movement or aim More...

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

Public Types

enum  Modes { Modes.Movement, Modes.WeaponAim }
 the possible directions we can aim the target object at More...
 
enum  PossibleAxis { PossibleAxis.Right, PossibleAxis.Forward }
 the axis to aim at the movement or weapon aim direction More...
 
- Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { InitializationModes.EveryTime, InitializationModes.OnlyOnce }
 

Public Member Functions

override void Initialization ()
 On init we grab our components More...
 
override void PerformAction ()
 
override void OnEnterState ()
 On entry we grab the weapon aim and cache it 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

GameObject GameObjectToAim
 an object to aim More...
 
Modes Mode = Modes.Movement
 whether to aim at the AI's movement direction or the weapon aim direction More...
 
PossibleAxis Axis = PossibleAxis.Right
 the axis to aim at the moment or weapon aim direction (usually right for 2D, forward for 3D) More...
 
bool Interpolate = false
 whether or not to interpolate the rotation More...
 
float InterpolateRate = 5f
 the rate at which to interpolate the rotation 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 AimObject ()
 Aims the object at either movement or weapon aim if possible More...
 
virtual void AimAt (Vector3 direction)
 Rotates the target object, interpolating the rotation if needed More...
 
virtual void GrabWeaponAim ()
 Caches the weapon aim comp More...
 
- Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain More...
 

Protected Attributes

CharacterHandleWeapon _characterHandleWeapon
 
WeaponAim _weaponAim
 
TopDownController _controller
 
Vector3 _newAim
 
- Protected Attributes inherited from MoreMountains.Tools.AIAction
bool _initialized
 
AIBrain _brain
 

Additional Inherited Members

- Properties inherited from MoreMountains.Tools.AIAction
virtual bool ActionInProgress [get, set]
 
virtual bool ShouldInitialize [get]
 

Detailed Description

An AIACtion used to aim any object in the direction of the AI's movement or aim

Member Enumeration Documentation

◆ Modes

the possible directions we can aim the target object at

Enumerator
Movement 
WeaponAim 

◆ PossibleAxis

the axis to aim at the movement or weapon aim direction

Enumerator
Right 
Forward 

Member Function Documentation

◆ AimAt()

virtual void MoreMountains.TopDownEngine.AIActionAimObject.AimAt ( Vector3  direction)
protectedvirtual

Rotates the target object, interpolating the rotation if needed

Parameters
direction

◆ AimObject()

virtual void MoreMountains.TopDownEngine.AIActionAimObject.AimObject ( )
protectedvirtual

Aims the object at either movement or weapon aim if possible

◆ GrabWeaponAim()

virtual void MoreMountains.TopDownEngine.AIActionAimObject.GrabWeaponAim ( )
protectedvirtual

Caches the weapon aim comp

◆ Initialization()

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

On init we grab our components

Reimplemented from MoreMountains.Tools.AIAction.

◆ OnEnterState()

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

On entry we grab the weapon aim and cache it

Reimplemented from MoreMountains.Tools.AIAction.

◆ PerformAction()

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

Member Data Documentation

◆ _characterHandleWeapon

CharacterHandleWeapon MoreMountains.TopDownEngine.AIActionAimObject._characterHandleWeapon
protected

◆ _controller

TopDownController MoreMountains.TopDownEngine.AIActionAimObject._controller
protected

◆ _newAim

Vector3 MoreMountains.TopDownEngine.AIActionAimObject._newAim
protected

◆ _weaponAim

WeaponAim MoreMountains.TopDownEngine.AIActionAimObject._weaponAim
protected

◆ Axis

PossibleAxis MoreMountains.TopDownEngine.AIActionAimObject.Axis = PossibleAxis.Right

the axis to aim at the moment or weapon aim direction (usually right for 2D, forward for 3D)

◆ GameObjectToAim

GameObject MoreMountains.TopDownEngine.AIActionAimObject.GameObjectToAim

an object to aim

◆ Interpolate

bool MoreMountains.TopDownEngine.AIActionAimObject.Interpolate = false

whether or not to interpolate the rotation

◆ InterpolateRate

float MoreMountains.TopDownEngine.AIActionAimObject.InterpolateRate = 5f

the rate at which to interpolate the rotation

◆ Mode

Modes MoreMountains.TopDownEngine.AIActionAimObject.Mode = Modes.Movement

whether to aim at the AI's movement direction or the weapon aim direction


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