Superfighters Deluxe
PlayerDamageArgs Struct Reference

PlayerDamageCallback.Event arguments More...

Public Member Functions

 PlayerDamageArgs (PlayerDamageEventType dmgType, float dmg, bool overkillDamage, int sourceID)
 

Public Attributes

readonly float Damage
 Damage amount More...
 
readonly PlayerDamageEventType DamageType
 Gets the type of damage. More...
 
readonly bool OverkillDamage
 Gets if this is overkill damage when the player is already dead and takes additional damage. More...
 
readonly int SourceID
 Source damage object ID. Usage ID depends on the PlayerDamageEventType. if DamageType is PlayerDamageEventType.Projectile Use Game.GetProjectile(args.SourceID) to get the projectile. if DamageType is PlayerDamageEventType.Melee Use Game.GetPlayer(args.SourceID) to get the player. if DamageType is PlayerDamageEventType.Missile Use Game.GetObject(args.SourceID) to get the object. if DamageType is PlayerDamageEventType.Explosion the args.SourceID is the originating explosion ID (an unique ID per explosion, no other data available). if DamageType is PlayerDamageEventType.Other the args.SourceID depends on the script calling DealDamage(...) what SourceID represent. More...
 

Detailed Description

PlayerDamageCallback.Event arguments

Member Data Documentation

◆ Damage

readonly float Damage

Damage amount

◆ DamageType

readonly PlayerDamageEventType DamageType

Gets the type of damage.

◆ OverkillDamage

readonly bool OverkillDamage

Gets if this is overkill damage when the player is already dead and takes additional damage.

◆ SourceID

readonly int SourceID

Source damage object ID. Usage ID depends on the PlayerDamageEventType. if DamageType is PlayerDamageEventType.Projectile Use Game.GetProjectile(args.SourceID) to get the projectile. if DamageType is PlayerDamageEventType.Melee Use Game.GetPlayer(args.SourceID) to get the player. if DamageType is PlayerDamageEventType.Missile Use Game.GetObject(args.SourceID) to get the object. if DamageType is PlayerDamageEventType.Explosion the args.SourceID is the originating explosion ID (an unique ID per explosion, no other data available). if DamageType is PlayerDamageEventType.Other the args.SourceID depends on the script calling DealDamage(...) what SourceID represent.