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

Wraps information about a (potentially) damage causing hit to the player. More...

Public Member Functions

 DamageInfo (int amount, DamageType damageType, Vector2 direction)
 Initializes a new instance of the PlatformerPro.DamageInfo class. More...
 
 DamageInfo (int amount, DamageType damageType, Vector2 direction, IMob damageCauser)
 Initializes a new instance of the PlatformerPro.DamageInfo class. More...
 
 DamageInfo ()
 Initializes a new instance of the PlatformerPro.DamageInfo class. More...
 

Properties

virtual int Amount [get, set]
 The raw damage amount. More...
 
virtual Vector2 Direction [get, set]
 The direction to the object causing the damage. You can use this to provide specific damage types. More...
 
virtual DamageType DamageType [get, set]
 The type of the damage. More...
 
IMob DamageCauser [get, set]
 Optional info about who caused the damage. Null if unknown or damage causer was not a character. More...
 

Detailed Description

Wraps information about a (potentially) damage causing hit to the player.

Constructor & Destructor Documentation

◆ DamageInfo() [1/3]

PlatformerPro.DamageInfo.DamageInfo ( int  amount,
DamageType  damageType,
Vector2  direction 
)

Initializes a new instance of the PlatformerPro.DamageInfo class.

Parameters
amountAmount.
damageTypeDamage type.
directionDirection.

◆ DamageInfo() [2/3]

PlatformerPro.DamageInfo.DamageInfo ( int  amount,
DamageType  damageType,
Vector2  direction,
IMob  damageCauser 
)

Initializes a new instance of the PlatformerPro.DamageInfo class.

Parameters
amountAmount.
damageTypeDamage type.
directionDirection.

◆ DamageInfo() [3/3]

PlatformerPro.DamageInfo.DamageInfo ( )

Initializes a new instance of the PlatformerPro.DamageInfo class.

Property Documentation

◆ Amount

virtual int PlatformerPro.DamageInfo.Amount
getset

The raw damage amount.

◆ DamageCauser

IMob PlatformerPro.DamageInfo.DamageCauser
getset

Optional info about who caused the damage. Null if unknown or damage causer was not a character.

◆ DamageType

virtual DamageType PlatformerPro.DamageInfo.DamageType
getset

The type of the damage.

◆ Direction

virtual Vector2 PlatformerPro.DamageInfo.Direction
getset

The direction to the object causing the damage. You can use this to provide specific damage types.


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