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

A special movement which provides a more robust (but slightly more performance expensive) alternative to the JumpOnHeadHitBox. More...

Inheritance diagram for PlatformerPro.SpecialMovement_JumpOnHead:
PlatformerPro.SpecialMovement PlatformerPro.BaseMovement< SpecialMovement >

Public Member Functions

override Movement Init (Character character, MovementVariable[] movementData)
 Initialise the movement with the given movement data. More...
 
override bool WantsSpecialMove ()
 Gets a value indicating whether this movement wants to do a special move. More...
 
override void DoMove ()
 Moves the character. More...
 
- Public Member Functions inherited from PlatformerPro.SpecialMovement
virtual void DoSpecialMove ()
 Start the special mvoe More...
 
- Public Member Functions inherited from PlatformerPro.BaseMovement< SpecialMovement >
sealed override Movement Init (Character character)
 Initialise this movement. More...
 
bool IsMovementDataDifferent (MovementVariable[] originalMovementData)
 Determines whether this instances movement data is different from the supplied originalMovementData. More...
 

Public Attributes

int damageAmount
 The amount of damage a jump on head does. More...
 
float bobbleHeight
 The height of the bobble. More...
 
bool kickHidingEnemies
 If true enemies in the hiding state will be 'kicked' even if the character isn't jumping. More...
 
LayerMask enemyLayerMask
 The layers to check for enemies. More...
 

Protected Member Functions

virtual bool CheckForJumpOnHead ()
 Checks for jumping on head. More...
 
virtual bool CheckForKick ()
 Checks for jumping on kicking. More...
 
virtual IHurtable CheckCollisions (RaycastType type)
 Checks the given collisions type for enemies. More...
 

Protected Attributes

bool waitingToJump
 Did we just jump on an an enemy. More...
 
bool waitingToKick
 Did we just kick an enemy. More...
 
float kickAnimationTimer
 Timer to control how long we play the kicked animation for; More...
 
IHurtable enemyHurtBox
 Cached reference to enemy hurt box. More...
 
DamageInfo damageInfo
 Cached damage info. More...
 
- Protected Attributes inherited from PlatformerPro.BaseMovement< SpecialMovement >
Movement implementation
 The class that will do the movement. More...
 
string movementType
 The type of movement as a string. More...
 
MovementVariable[] movementData
 Data that should be applied to the movement type on init. More...
 

Static Protected Attributes

const int DamageAmountIndex = 0
 The index of the damage amount in movement data. More...
 
const int BobbleHeightIndex = 1
 The index of the bobble height in movement data. More...
 
const int KickHidingEnemiesIndex = 2
 The index of kick hiding enemies in movement data. More...
 
const int EnemyLayermaskIndex = 3
 The index of the enemy layer mask in the movement data. More...
 
const int MovementVariableCount = 4
 The size of the movement variable array. More...
 

Properties

new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override AnimationState AnimationState [get]
 Gets the animation state that this movement wants to set. More...
 
- Properties inherited from PlatformerPro.SpecialMovement
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
- Properties inherited from PlatformerPro.BaseMovement< SpecialMovement >
virtual string MovementType [get, set]
 The type of movement as a string. More...
 
virtual MovementVariable[] MovementData [get, set]
 Data that should be applied to the movement type on init. More...
 
new static MovementInfo Info [get]
 Static movement info used by the editor. More...
 
override bool Enabled [get, set]
 A custom enable which base movements can use to pass on enable values. More...
 
override Movement Implementation [get]
 Gets the underlying implementation. More...
 

Detailed Description

A special movement which provides a more robust (but slightly more performance expensive) alternative to the JumpOnHeadHitBox.

Member Function Documentation

◆ CheckCollisions()

virtual IHurtable PlatformerPro.SpecialMovement_JumpOnHead.CheckCollisions ( RaycastType  type)
protectedvirtual

Checks the given collisions type for enemies.

Returns
Returns an IHurtable if found, or null if not found.

◆ CheckForJumpOnHead()

virtual bool PlatformerPro.SpecialMovement_JumpOnHead.CheckForJumpOnHead ( )
protectedvirtual

Checks for jumping on head.

Returns
true, if character is jumping on an enmies head.

◆ CheckForKick()

virtual bool PlatformerPro.SpecialMovement_JumpOnHead.CheckForKick ( )
protectedvirtual

Checks for jumping on kicking.

Returns
true, if character is kicking an enemy.

◆ DoMove()

override void PlatformerPro.SpecialMovement_JumpOnHead.DoMove ( )

Moves the character.

◆ Init()

override Movement PlatformerPro.SpecialMovement_JumpOnHead.Init ( Character  character,
MovementVariable[]  movementData 
)

Initialise the movement with the given movement data.

Parameters
characterCharacter.
movementDataMovement data.

◆ WantsSpecialMove()

override bool PlatformerPro.SpecialMovement_JumpOnHead.WantsSpecialMove ( )
virtual

Gets a value indicating whether this movement wants to do a special move.

true if this instance wants control; otherwise, false.

Reimplemented from PlatformerPro.SpecialMovement.

Member Data Documentation

◆ bobbleHeight

float PlatformerPro.SpecialMovement_JumpOnHead.bobbleHeight

The height of the bobble.

◆ BobbleHeightIndex

const int PlatformerPro.SpecialMovement_JumpOnHead.BobbleHeightIndex = 1
staticprotected

The index of the bobble height in movement data.

◆ damageAmount

int PlatformerPro.SpecialMovement_JumpOnHead.damageAmount

The amount of damage a jump on head does.

◆ DamageAmountIndex

const int PlatformerPro.SpecialMovement_JumpOnHead.DamageAmountIndex = 0
staticprotected

The index of the damage amount in movement data.

◆ damageInfo

DamageInfo PlatformerPro.SpecialMovement_JumpOnHead.damageInfo
protected

Cached damage info.

◆ enemyHurtBox

IHurtable PlatformerPro.SpecialMovement_JumpOnHead.enemyHurtBox
protected

Cached reference to enemy hurt box.

◆ enemyLayerMask

LayerMask PlatformerPro.SpecialMovement_JumpOnHead.enemyLayerMask

The layers to check for enemies.

◆ EnemyLayermaskIndex

const int PlatformerPro.SpecialMovement_JumpOnHead.EnemyLayermaskIndex = 3
staticprotected

The index of the enemy layer mask in the movement data.

◆ kickAnimationTimer

float PlatformerPro.SpecialMovement_JumpOnHead.kickAnimationTimer
protected

Timer to control how long we play the kicked animation for;

◆ kickHidingEnemies

bool PlatformerPro.SpecialMovement_JumpOnHead.kickHidingEnemies

If true enemies in the hiding state will be 'kicked' even if the character isn't jumping.

◆ KickHidingEnemiesIndex

const int PlatformerPro.SpecialMovement_JumpOnHead.KickHidingEnemiesIndex = 2
staticprotected

The index of kick hiding enemies in movement data.

◆ MovementVariableCount

const int PlatformerPro.SpecialMovement_JumpOnHead.MovementVariableCount = 4
staticprotected

The size of the movement variable array.

◆ waitingToJump

bool PlatformerPro.SpecialMovement_JumpOnHead.waitingToJump
protected

Did we just jump on an an enemy.

◆ waitingToKick

bool PlatformerPro.SpecialMovement_JumpOnHead.waitingToKick
protected

Did we just kick an enemy.

Property Documentation

◆ AnimationState

override AnimationState PlatformerPro.SpecialMovement_JumpOnHead.AnimationState
get

Gets the animation state that this movement wants to set.

◆ Info

new static MovementInfo PlatformerPro.SpecialMovement_JumpOnHead.Info
staticget

Static movement info used by the editor.


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