![]() |
Platformer Pro
2.3.2
A platform game kit for Unity.
|
A hazard causes damage to a player. The default hazard is a trigger and requires the player to have a collider. More...
Public Attributes | |
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... | |
Protected Member Functions | |
virtual void | Init () |
Initialise this instance. More... | |
virtual void | DoHit (Collider2D other) |
Do the actual hit. More... | |
Protected Attributes | |
bool | hasFired |
Has the damage happened (for one shot types). More... | |
DamageInfo | damageInfo |
Cache the damage info to avoid allocation. More... | |
A hazard causes damage to a player. The default hazard is a trigger and requires the player to have a collider.
|
protectedvirtual |
Do the actual hit.
other | Other. |
Reimplemented in PlatformerPro.EnemyHitBox, and PlatformerPro.EnemyHazard.
|
protectedvirtual |
Initialise this instance.
Reimplemented in PlatformerPro.EnemyHazard.
int PlatformerPro.Hazard.damageAmount |
Amount of damage dealt by this object.
bool PlatformerPro.Hazard.damageCharacters = true |
Does this hazard cause damage to characters?
bool PlatformerPro.Hazard.damageEnemies |
Does this hazard also cause damage to enemies?
|
protected |
Cache the damage info to avoid allocation.
DamageType PlatformerPro.Hazard.damageType |
What type of damage does this hazard cause?
|
protected |
Has the damage happened (for one shot types).
bool PlatformerPro.Hazard.oneShot |
Should the damage be caused once, or should it be sent every frame.