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

Projecitle aimer that always aims at the target. Not for use on characters! MULTIPLAYER TODO: This class only supports a single player game as it always targets the last loaded character. More...

Inheritance diagram for PlatformerPro.AutoAimProjectileAimer:
PlatformerPro.ProjectileAimer

Public Member Functions

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

Public Attributes

float offsetDistance
 The offset distance for the staring point of the projectile. More...
 
IMob target
 The character. More...
 
- Public Attributes inherited from PlatformerPro.ProjectileAimer
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 void Init ()
 Init this instance. More...
 
- Protected Member Functions inherited from PlatformerPro.ProjectileAimer
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...
 

Protected Attributes

PlatformerProGameManager characterLoader
 Reference to character loader More...
 

Detailed Description

Projecitle aimer that always aims at the target. Not for use on characters! MULTIPLAYER TODO: This class only supports a single player game as it always targets the last loaded character.

Member Function Documentation

◆ GetAimDirection()

override Vector2 PlatformerPro.AutoAimProjectileAimer.GetAimDirection ( Component  character)
virtual

Gets the aim direction.

Returns
The aim direction.

Reimplemented from PlatformerPro.ProjectileAimer.

◆ GetAimOffset()

override Vector2 PlatformerPro.AutoAimProjectileAimer.GetAimOffset ( IMob  character)
virtual

Offsets the projectile from character position.

Returns
The aim offset.
Parameters
characterCharacter.

Reimplemented from PlatformerPro.ProjectileAimer.

◆ Init()

virtual void PlatformerPro.AutoAimProjectileAimer.Init ( )
protectedvirtual

Init this instance.

Member Data Documentation

◆ characterLoader

PlatformerProGameManager PlatformerPro.AutoAimProjectileAimer.characterLoader
protected

Reference to character loader

◆ offsetDistance

float PlatformerPro.AutoAimProjectileAimer.offsetDistance

The offset distance for the staring point of the projectile.

◆ target

IMob PlatformerPro.AutoAimProjectileAimer.target

The character.


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