Summary

Describes the damage that should be done to something. This is purposefully a class so it can be derived from, allowing games to create their own special types of damage, while not having to create a whole new system.

Constructors

DamageInfo

Properties

Attacker Usually a player or Npc
Damage Amount of damage this should do
Hitbox The hitbox that we hit (if any)
IsExplosionobsolete True if this is explosive damage
Origin The origin of the damage. For bullets this would be the shooter's eye position. For explosions, this would be the center of the exposion.
Position The location of the damage on the hit object.
Shape The physics shape that we hit (if any)
Tags Tags for this damage, allows you to enter and read different damage types etc
Weapon The weapon that did the damage, or a vehicle etc
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.