TopDown Engine v4.5
Loading...
Searching...
No Matches
MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D Class Reference

Aims the weapon at the current target, in a 3D context. More...

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

Public Types

enum  AimOrigins { Transform , SpawnPoint }
Public Types inherited from MoreMountains.Tools.AIAction
enum  InitializationModes { EveryTime , OnlyOnce }

Public Member Functions

override void Initialization ()
 On init we grab our CharacterHandleWeapon ability.
override void PerformAction ()
 On PerformAction we face and aim if needed, and we shoot.
Public Member Functions inherited from MoreMountains.Tools.AIAction
void PerformAction ()
virtual void OnEnterState ()
 Describes what happens when the brain enters the state this action is in. Meant to be overridden.
virtual void OnExitState ()
 Describes what happens when the brain exits the state this action is in. Meant to be overridden.

Public Attributes

CharacterHandleWeapon TargetHandleWeaponAbility
 the CharacterHandleWeapon ability this AI action should pilot. If left blank, the system will grab the first one it finds.
AimOrigins AimOrigin = AimOrigins.Transform
 the origin we'll take into account when computing the aim direction towards the target
bool AimAtTarget = true
 if true the Character will aim at the target when shooting
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 TestAimAtTarget ()
 Aims at the target if required.
Protected Member Functions inherited from MoreMountains.Tools.AIAction
virtual void Awake ()
 On Awake we grab our AIBrain.

Protected Attributes

CharacterOrientation3D _orientation3D
Character _character
WeaponAim _weaponAim
ProjectileWeapon _projectileWeapon
Vector3 _weaponAimDirection
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

Aims the weapon at the current target, in a 3D context.

Member Enumeration Documentation

◆ AimOrigins

Member Function Documentation

◆ Initialization()

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

On init we grab our CharacterHandleWeapon ability.

Reimplemented from MoreMountains.Tools.AIAction.

◆ PerformAction()

override void MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D.PerformAction ( )

On PerformAction we face and aim if needed, and we shoot.

◆ TestAimAtTarget()

virtual void MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D.TestAimAtTarget ( )
protectedvirtual

Aims at the target if required.

Member Data Documentation

◆ _character

Character MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D._character
protected

◆ _orientation3D

CharacterOrientation3D MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D._orientation3D
protected

◆ _projectileWeapon

ProjectileWeapon MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D._projectileWeapon
protected

◆ _weaponAim

WeaponAim MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D._weaponAim
protected

◆ _weaponAimDirection

Vector3 MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D._weaponAimDirection
protected

◆ AimAtTarget

bool MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D.AimAtTarget = true

if true the Character will aim at the target when shooting

◆ AimOrigin

AimOrigins MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D.AimOrigin = AimOrigins.Transform

the origin we'll take into account when computing the aim direction towards the target

◆ TargetHandleWeaponAbility

CharacterHandleWeapon MoreMountains.TopDownEngine.AIActionAimWeaponAtTarget3D.TargetHandleWeaponAbility

the CharacterHandleWeapon ability this AI action should pilot. If left blank, the system will grab the first one it finds.


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