Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.ProjectileAimer Class Reference

Provides aiming details for a projectile. More...

Inheritance diagram for PlatformerPro.ProjectileAimer:
PlatformerPro.AlternateAxisAimer PlatformerPro.AutoAimProjectileAimer PlatformerPro.GrappleAimer

Public Member Functions

virtual Vector2 GetAimDirection (Component character)
 Gets the aim direction. More...
 
virtual Vector2 GetAimOffset (IMob character)
 Offsets the projectile from character position. More...
 

Public Attributes

ProjectileAimingTypes aimType
 How is the projectile aimed? More...
 
Vector2 offset
 How far offset is the bullet from the character position. More...
 
bool flipOffsets = true
 If true the projectile offset flips with direction change. If false it doesn't. More...
 
Vector2 angle
 What is the default angle to shoot at when facing right (used for ANGLED type shooting only). More...
 
bool canAimWhenCrouched
 If true aiming function as normal when crouched. If false crouch shooting is always in facing direction. More...
 
Vector2 crouchOffset
 Alternate offset to use when crouching. More...
 

Protected Member Functions

virtual Vector2 MouseAimDirection (Component character)
 Get aim direction based on character position relative to mouse More...
 
virtual Vector2 EightWayAimDirection (Component character)
 Get aim direction based on eight way directions using character input. More...
 
virtual Vector2 SixWayAimDirection (Component character)
 Get aim direction based on six way directions using character input. More...
 
virtual Vector2 FourWayAimDirection (Component character)
 Get aim direction based on four way directions using character input. More...
 

Detailed Description

Provides aiming details for a projectile.

Member Function Documentation

◆ EightWayAimDirection()

virtual Vector2 PlatformerPro.ProjectileAimer.EightWayAimDirection ( Component  character)
protectedvirtual

Get aim direction based on eight way directions using character input.

Returns
The aim direction.

◆ FourWayAimDirection()

virtual Vector2 PlatformerPro.ProjectileAimer.FourWayAimDirection ( Component  character)
protectedvirtual

Get aim direction based on four way directions using character input.

Returns
The aim direction.

◆ GetAimDirection()

virtual Vector2 PlatformerPro.ProjectileAimer.GetAimDirection ( Component  character)
virtual

Gets the aim direction.

Returns
The aim direction.

Reimplemented in PlatformerPro.GrappleAimer, PlatformerPro.AutoAimProjectileAimer, and PlatformerPro.AlternateAxisAimer.

◆ GetAimOffset()

virtual Vector2 PlatformerPro.ProjectileAimer.GetAimOffset ( IMob  character)
virtual

Offsets the projectile from character position.

Returns
The aim offset.

Reimplemented in PlatformerPro.GrappleAimer, and PlatformerPro.AutoAimProjectileAimer.

◆ MouseAimDirection()

virtual Vector2 PlatformerPro.ProjectileAimer.MouseAimDirection ( Component  character)
protectedvirtual

Get aim direction based on character position relative to mouse

Returns
The aim direction.

◆ SixWayAimDirection()

virtual Vector2 PlatformerPro.ProjectileAimer.SixWayAimDirection ( Component  character)
protectedvirtual

Get aim direction based on six way directions using character input.

Returns
The aim direction.

Member Data Documentation

◆ aimType

ProjectileAimingTypes PlatformerPro.ProjectileAimer.aimType

How is the projectile aimed?

◆ angle

Vector2 PlatformerPro.ProjectileAimer.angle

What is the default angle to shoot at when facing right (used for ANGLED type shooting only).

◆ canAimWhenCrouched

bool PlatformerPro.ProjectileAimer.canAimWhenCrouched

If true aiming function as normal when crouched. If false crouch shooting is always in facing direction.

◆ crouchOffset

Vector2 PlatformerPro.ProjectileAimer.crouchOffset

Alternate offset to use when crouching.

◆ flipOffsets

bool PlatformerPro.ProjectileAimer.flipOffsets = true

If true the projectile offset flips with direction change. If false it doesn't.

◆ offset

Vector2 PlatformerPro.ProjectileAimer.offset

How far offset is the bullet from the character position.


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