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

A hit box which damages enemies when the character jumps on them. It does this by ignoring hits that happen while character is grounded or moving upwards. More...

Inheritance diagram for PlatformerPro.JumpOnHeadHitBox:
PlatformerPro.CharacterHitBox PlatformerPro.PlatformerProMonoBehaviour PlatformerPro.ICharacterReference

Public Member Functions

virtual void Init ()
 Init this instance. More...
 
- Public Member Functions inherited from PlatformerPro.CharacterHitBox
virtual void Init (DamageInfo info)
 Init this instance, this should be called by the attack system during Start(); More...
 
virtual void UpdateDamageInfo (int amount, DamageType damageType)
 Updates the damage info with new values. More...
 
virtual void EnableImmediate ()
 Start the hit with no timer. More...
 
virtual void DisableImmediate ()
 Stop the hit immedaitely. More...
 
virtual void EnableImmediate (float enableTime, float disableTime)
 Start the hit. More...
 
virtual void ForceStop ()
 Forces the attack to finish. More...
 
- Public Member Functions inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual void Validate (PlatformerProMonoBehaviour myTarget)
 Override this method if you want to provide custom validation. The actual code should be surrounded by the if UNITY_EDITOR / endif directive. More...
 

Public Attributes

int damageAmount
 The amount of damage a jump on head does. More...
 
float bobbleHeight
 The height of the bobble. More...
 
bool doBobbleAsJump
 If true the bobble will be handled like a very small jump, else it will just set y velocity. More...
 
bool kickHidingEnemies
 If true enemies in the hiding state will be 'kicked' even if the character isn't jumping. More...
 
- Public Attributes inherited from PlatformerPro.CharacterHitBox
string weaponSlot
 If non-null we will apply the damage type from the weapon equipped in the given weapon slot, overriding any damage type set on the attack. More...
 

Protected Member Functions

override bool DoHit (Collider2D other)
 Do the actual hit. More...
 
virtual void DoBobble ()
 Does the bounce in to air after a jump. More...
 
virtual IEnumerator ResetCollider ()
 Resets the hitbox ready to cause damage again. More...
 
- Protected Member Functions inherited from PlatformerPro.CharacterHitBox
virtual IEnumerator DoEnable (float enableTime, float disableTime)
 Turn on the hit box. More...
 

Properties

override string Header [get]
 Gets the header string used to describe the component. More...
 
- Properties inherited from PlatformerPro.CharacterHitBox
override string Header [get]
 Gets the header string used to describe the component. More...
 
virtual Character Character [get, set]
 Gets the character. More...
 
virtual bool HasHit [get]
 Returns true if the hit box has hit something since it was last enabled. More...
 
- Properties inherited from PlatformerPro.PlatformerProMonoBehaviour
virtual string Header [get]
 Gets the header string used to describe the component. More...
 
virtual string DocLink [get]
 Gets a link to documentation site. More...
 
virtual string VideoLink [get]
 Gets a link to a youtube video. More...
 
virtual string Deprecated [get]
 If non-null this component is deprecated. The string shows a message indicating how it should be replaced. More...
 
- Properties inherited from PlatformerPro.ICharacterReference
Character Character [get, set]
 Get the character. More...
 

Additional Inherited Members

- Protected Attributes inherited from PlatformerPro.CharacterHitBox
IMob character
 The character this hit box is for. More...
 
Collider2D myCollider
 The actual collider. More...
 
float hitTimer
 Tracks the time for enalbing and disabling the hit box. More...
 
bool hasHitCharacter
 Tracks if this attack instance has hit an enemy. More...
 
DamageInfo damageInfo
 Cached damage info. More...
 

Detailed Description

A hit box which damages enemies when the character jumps on them. It does this by ignoring hits that happen while character is grounded or moving upwards.

Member Function Documentation

◆ DoBobble()

virtual void PlatformerPro.JumpOnHeadHitBox.DoBobble ( )
protectedvirtual

Does the bounce in to air after a jump.

◆ DoHit()

override bool PlatformerPro.JumpOnHeadHitBox.DoHit ( Collider2D  other)
protectedvirtual

Do the actual hit.

Parameters
otherOther.

Reimplemented from PlatformerPro.CharacterHitBox.

◆ Init()

virtual void PlatformerPro.JumpOnHeadHitBox.Init ( )
virtual

Init this instance.

◆ ResetCollider()

virtual IEnumerator PlatformerPro.JumpOnHeadHitBox.ResetCollider ( )
protectedvirtual

Resets the hitbox ready to cause damage again.

Returns
The collider.

Member Data Documentation

◆ bobbleHeight

float PlatformerPro.JumpOnHeadHitBox.bobbleHeight

The height of the bobble.

◆ damageAmount

int PlatformerPro.JumpOnHeadHitBox.damageAmount

The amount of damage a jump on head does.

◆ doBobbleAsJump

bool PlatformerPro.JumpOnHeadHitBox.doBobbleAsJump

If true the bobble will be handled like a very small jump, else it will just set y velocity.

◆ kickHidingEnemies

bool PlatformerPro.JumpOnHeadHitBox.kickHidingEnemies

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

Property Documentation

◆ Header

override string PlatformerPro.JumpOnHeadHitBox.Header
get

Gets the header string used to describe the component.

The header.


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