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

A collider that can register damage agaisnt the character. More...

Inheritance diagram for PlatformerPro.CharacterHurtBox:
PlatformerPro.PlatformerProMonoBehaviour PlatformerPro.IHurtable PlatformerPro.ICharacterReference PlatformerPro.CharacterBlockingHurtBox

Public Member Functions

virtual void Damage (int amount)
 Pass damage of the given amount to the CharacterHealth script. More...
 
virtual void Damage (DamageInfo info)
 Pass damage from the given hazard to the CharacterHealth script. More...
 
override void Validate (PlatformerProMonoBehaviour myTarget)
 Show validation details. More...
 

Protected Attributes

CharacterHealth health
 Cached reference to the characters health script. More...
 

Properties

override string Header [get]
 Gets the header string used to describe the component. More...
 
virtual Character Character [get, set]
 Gets the character reference. More...
 
virtual bool IsInvulnerable [get]
 Is the character currently invulnerable? More...
 
virtual IMob Mob [get]
 Get the mobile (charater) that this hurt box belongs too. Can return null. 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.IHurtable
IMob Mob [get]
 Get the mobile (charater or enemy) that this hurt box belongs too. Can return null. More...
 
- Properties inherited from PlatformerPro.ICharacterReference
Character Character [get, set]
 Get the character. More...
 

Detailed Description

A collider that can register damage agaisnt the character.

Member Function Documentation

◆ Damage() [1/2]

virtual void PlatformerPro.CharacterHurtBox.Damage ( DamageInfo  info)
virtual

Pass damage from the given hazard to the CharacterHealth script.

Parameters
infoInformation about the damage such as the hazard causing the damage.

Implements PlatformerPro.IHurtable.

Reimplemented in PlatformerPro.CharacterBlockingHurtBox.

◆ Damage() [2/2]

virtual void PlatformerPro.CharacterHurtBox.Damage ( int  amount)
virtual

Pass damage of the given amount to the CharacterHealth script.

Parameters
amountAmount.

◆ Validate()

override void PlatformerPro.CharacterHurtBox.Validate ( PlatformerProMonoBehaviour  myTarget)
virtual

Show validation details.

Parameters
myTarget

Reimplemented from PlatformerPro.PlatformerProMonoBehaviour.

Member Data Documentation

◆ health

CharacterHealth PlatformerPro.CharacterHurtBox.health
protected

Cached reference to the characters health script.

Property Documentation

◆ Character

virtual Character PlatformerPro.CharacterHurtBox.Character
getset

Gets the character reference.

The character.

◆ Header

override string PlatformerPro.CharacterHurtBox.Header
get

Gets the header string used to describe the component.

The header.

◆ IsInvulnerable

virtual bool PlatformerPro.CharacterHurtBox.IsInvulnerable
get

Is the character currently invulnerable?

The character.

◆ Mob

virtual IMob PlatformerPro.CharacterHurtBox.Mob
get

Get the mobile (charater) that this hurt box belongs too. Can return null.


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