An Action that shoots using the currently equipped weapon. If your weapon is in auto mode, will shoot until you exit the state, and will only shoot once in SemiAuto mode. You can optionnally have the character face (left/right) the target, and aim at it (if the weapon has a WeaponAim component).
More...
|
| virtual void | Update () |
| | Sets the current aim if needed.
|
| virtual void | MakeChangesToTheWeapon () |
| | Makes changes to the weapon to ensure it works ok with AI scripts.
|
| virtual void | TestFaceTarget () |
| | Faces the target if required.
|
| virtual void | TestAimAtTarget () |
| | Aims at the target if required.
|
| virtual void | Shoot () |
| | Activates the weapon.
|
| virtual void | Awake () |
| | On Awake we grab our AIBrain.
|
An Action that shoots using the currently equipped weapon. If your weapon is in auto mode, will shoot until you exit the state, and will only shoot once in SemiAuto mode. You can optionnally have the character face (left/right) the target, and aim at it (if the weapon has a WeaponAim component).
◆ AimOrigins
| Enumerator |
|---|
| Transform | |
| SpawnPoint | |
◆ Initialization()
| override void MoreMountains.TopDownEngine.AIActionShoot2D.Initialization |
( |
| ) |
|
|
virtual |
◆ MakeChangesToTheWeapon()
| virtual void MoreMountains.TopDownEngine.AIActionShoot2D.MakeChangesToTheWeapon |
( |
| ) |
|
|
protectedvirtual |
Makes changes to the weapon to ensure it works ok with AI scripts.
◆ OnEnterState()
| override void MoreMountains.TopDownEngine.AIActionShoot2D.OnEnterState |
( |
| ) |
|
|
virtual |
◆ OnExitState()
| override void MoreMountains.TopDownEngine.AIActionShoot2D.OnExitState |
( |
| ) |
|
|
virtual |
◆ PerformAction()
| override void MoreMountains.TopDownEngine.AIActionShoot2D.PerformAction |
( |
| ) |
|
On PerformAction we face and aim if needed, and we shoot.
◆ Shoot()
| virtual void MoreMountains.TopDownEngine.AIActionShoot2D.Shoot |
( |
| ) |
|
|
protectedvirtual |
◆ TestAimAtTarget()
| virtual void MoreMountains.TopDownEngine.AIActionShoot2D.TestAimAtTarget |
( |
| ) |
|
|
protectedvirtual |
Aims at the target if required.
◆ TestFaceTarget()
| virtual void MoreMountains.TopDownEngine.AIActionShoot2D.TestFaceTarget |
( |
| ) |
|
|
protectedvirtual |
Faces the target if required.
◆ Update()
| virtual void MoreMountains.TopDownEngine.AIActionShoot2D.Update |
( |
| ) |
|
|
protectedvirtual |
Sets the current aim if needed.
◆ _character
| Character MoreMountains.TopDownEngine.AIActionShoot2D._character |
|
protected |
◆ _numberOfShoots
| int MoreMountains.TopDownEngine.AIActionShoot2D._numberOfShoots = 0 |
|
protected |
◆ _orientation2D
◆ _projectileWeapon
◆ _shooting
| bool MoreMountains.TopDownEngine.AIActionShoot2D._shooting = false |
|
protected |
◆ _weaponAim
| WeaponAim MoreMountains.TopDownEngine.AIActionShoot2D._weaponAim |
|
protected |
◆ _weaponAimDirection
| Vector3 MoreMountains.TopDownEngine.AIActionShoot2D._weaponAimDirection |
|
protected |
◆ AimAtTarget
| bool MoreMountains.TopDownEngine.AIActionShoot2D.AimAtTarget = false |
if true the Character will aim at the target when shooting
◆ AimOrigin
the origin we'll take into account when computing the aim direction towards the target
◆ FaceTarget
| bool MoreMountains.TopDownEngine.AIActionShoot2D.FaceTarget = true |
if true, the Character will face the target (left/right) when shooting
◆ OnlyAimWhenInState
| bool MoreMountains.TopDownEngine.AIActionShoot2D.OnlyAimWhenInState = false |
whether or not to only perform aim when in this state
◆ ShootOffset
| Vector3 MoreMountains.TopDownEngine.AIActionShoot2D.ShootOffset |
an offset to apply to the aim (useful to aim at the head/torso/etc automatically)
◆ 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:
- H:/Code/MoreMountains/topdownengine/Assets/TopDownEngine/Common/Scripts/Characters/AI/Advanced/AIActionShoot2D.cs