![]() |
Superfighters Deluxe
|
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... | |
ObjectDamageCallback.Event arguments
ObjectDamageArgs | ( | ObjectDamageType | damageType, |
float | damage, | ||
bool | isPlayer, | ||
int | sourceID | ||
) |
damageType | |
damage | |
isPlayer | |
sourceID |
readonly float Damage |
Gets the damage amount.
readonly ObjectDamageType DamageType |
Gets the damage type.
readonly bool IsPlayer |
Gets if the sourceID refers to a player. True when DamageType is Player or PlayerImpact.
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.