TopDown Engine v4.5
Loading...
Searching...
No Matches
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 { Movement , WeaponAim }
 the possible directions we can aim the target object at More...
enum  PossibleAxis { Right , Forward }
 the axis to aim at the movement or weapon aim direction More...
Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { EveryTime , OnlyOnce }

Public Member Functions

override void Initialization ()
 On init we grab our components.
override void PerformAction ()
override void OnEnterState ()
 On entry we grab the weapon aim and cache it.
Public Member Functions inherited from MoreMountains.Tools.AIAction
void PerformAction ()
virtual void OnExitState ()
 Describes what happens when the brain exits the state this action is in. Meant to be overridden.

Public Attributes

GameObject GameObjectToAim
 an object to aim
Modes Mode = Modes.Movement
 whether to aim at the AI's movement direction or the weapon aim direction
PossibleAxis Axis = PossibleAxis.Right
 the axis to aim at the moment or weapon aim direction (usually right for 2D, forward for 3D)
bool Interpolate = false
 whether or not to interpolate the rotation
float InterpolateRate = 5f
 the rate at which to interpolate the rotation
Public Attributes inherited from MoreMountains.Tools.AIAction
InitializationModes InitializationMode
 whether initialization should happen only once, or every time the brain is reset
string Label
 a label you can set to organize your AI Actions, not used by anything else

Protected Member Functions

virtual void AimObject ()
 Aims the object at either movement or weapon aim if possible.
virtual void AimAt (Vector3 direction)
 Rotates the target object, interpolating the rotation if needed.
virtual void GrabWeaponAim ()
 Caches the weapon aim comp.
Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain.

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 ( )

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:
  • H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/AI/Advanced/AIActionAimObject.cs