Superfighters Deluxe
ObjectDamageArgs Struct Reference

ObjectDamageCallback.Event arguments More...

Public Member Functions

 ObjectDamageArgs (ObjectDamageType damageType, float damage, bool isPlayer, int sourceID)
 

Public Attributes

readonly float Damage
 Gets the damage amount. More...
 
readonly ObjectDamageType DamageType
 Gets the damage type. More...
 
readonly bool IsPlayer
 Gets if the sourceID refers to a player. True when DamageType is Player or PlayerImpact. More...
 
readonly int SourceID
 Gets the sourceID causing the damage. if DamageType is ObjectDamageType.Projectile Use Game.GetProjectile(args.SourceID) to get the projectile. if DamageType is ObjectDamageType.Player|PlayerImpact Use Game.GetPlayer(args.SourceID) to get the player. if DamageType is ObjectDamageType.Impact Use Game.GetObject(args.SourceID) to get the object. if DamageType is ObjectDamageType.Explosion the args.SourceID is the originating explosion ID (an unique ID per explosion, no other data available). if DamageType is ObjectDamageType.Other the args.SourceID depends on the script calling DealDamage(...) what SourceID represent. More...
 

Detailed Description

ObjectDamageCallback.Event arguments

Constructor & Destructor Documentation

◆ ObjectDamageArgs()

ObjectDamageArgs ( ObjectDamageType  damageType,
float  damage,
bool  isPlayer,
int  sourceID 
)

Parameters
damageType
damage
isPlayer
sourceID

Member Data Documentation

◆ Damage

readonly float Damage

Gets the damage amount.

◆ DamageType

readonly ObjectDamageType DamageType

Gets the damage type.

◆ IsPlayer

readonly bool IsPlayer

Gets if the sourceID refers to a player. True when DamageType is Player or PlayerImpact.

◆ SourceID

readonly int SourceID

Gets the sourceID causing the damage. if DamageType is ObjectDamageType.Projectile Use Game.GetProjectile(args.SourceID) to get the projectile. if DamageType is ObjectDamageType.Player|PlayerImpact Use Game.GetPlayer(args.SourceID) to get the player. if DamageType is ObjectDamageType.Impact Use Game.GetObject(args.SourceID) to get the object. if DamageType is ObjectDamageType.Explosion the args.SourceID is the originating explosion ID (an unique ID per explosion, no other data available). if DamageType is ObjectDamageType.Other the args.SourceID depends on the script calling DealDamage(...) what SourceID represent.