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

Like a normal hazard but it has an enemy reference and tells the enemy when it hit the character. More...

Inheritance diagram for PlatformerPro.EnemyHazard:
PlatformerPro.Hazard PlatformerPro.EnemyHitBox

Protected Member Functions

override void Init ()
 Initialise this instance. More...
 
override void DoHit (Collider2D other)
 Do the actual hit. More...
 

Protected Attributes

Enemy enemy
 
CharacterHurtBox deferredHit
 Store the hit ready for processing at end of frame (note wont hit multiple enemies). More...
 
- Protected Attributes inherited from PlatformerPro.Hazard
bool hasFired
 Has the damage happened (for one shot types). More...
 
DamageInfo damageInfo
 Cache the damage info to avoid allocation. More...
 

Additional Inherited Members

- Public Attributes inherited from PlatformerPro.Hazard
int damageAmount
 Amount of damage dealt by this object. More...
 
DamageType damageType
 What type of damage does this hazard cause? More...
 
bool oneShot
 Should the damage be caused once, or should it be sent every frame. More...
 
bool damageCharacters = true
 Does this hazard cause damage to characters? More...
 
bool damageEnemies
 Does this hazard also cause damage to enemies? More...
 

Detailed Description

Like a normal hazard but it has an enemy reference and tells the enemy when it hit the character.

Member Function Documentation

◆ DoHit()

override void PlatformerPro.EnemyHazard.DoHit ( Collider2D  other)
protectedvirtual

Do the actual hit.

Parameters
otherOther.

Reimplemented from PlatformerPro.Hazard.

Reimplemented in PlatformerPro.EnemyHitBox.

◆ Init()

override void PlatformerPro.EnemyHazard.Init ( )
protectedvirtual

Initialise this instance.

Reimplemented from PlatformerPro.Hazard.

Member Data Documentation

◆ deferredHit

CharacterHurtBox PlatformerPro.EnemyHazard.deferredHit
protected

Store the hit ready for processing at end of frame (note wont hit multiple enemies).

◆ enemy

Enemy PlatformerPro.EnemyHazard.enemy
protected

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