Component that subscribes to BulletEnvironment events and listens to Bullet.OnCollision event. It will apply the damage to the IDamageableByBullet found on the DynamicSurface that the Bullet collided with.
More...
Component that subscribes to BulletEnvironment events and listens to Bullet.OnCollision event. It will apply the damage to the IDamageableByBullet found on the DynamicSurface that the Bullet collided with.
Definition at line 12 of file BulletDamageHandler.cs.
◆ GetApplicableDamage()
| virtual float BulletDynamics.Damage.BulletDamageHandler.GetApplicableDamage |
( |
Bullet | bullet | ) |
|
|
protectedvirtual |
◆ OnBulletCollision()
Handler for the Bullet.OnCollision event.
It will apply damage to the IDamageableByBullet component found on the surface game object or any parent object (using GameObject.GetComponentInParent(System.Type)).
If the surface or the IDamageableByBullet is null, damage won't be applied.
- Parameters
-
| surface | DynamicSurface that the Bullet hit. |
| hitInfo | Information about the hit. |
| bullet | Bullet that raised this event. |
Definition at line 63 of file BulletDamageHandler.cs.
◆ OnDestroy()
| virtual void BulletDynamics.Damage.BulletDamageHandler.OnDestroy |
( |
| ) |
|
|
protectedvirtual |
◆ Start()
| virtual void BulletDynamics.Damage.BulletDamageHandler.Start |
( |
| ) |
|
|
protectedvirtual |
◆ _damageConnections
◆ _defaultDamage
| float BulletDynamics.Damage.BulletDamageHandler._defaultDamage = 100 |
|
protected |
◆ _reduceDamageBasedOnBulletVelocity
| bool BulletDynamics.Damage.BulletDamageHandler._reduceDamageBasedOnBulletVelocity = true |
|
protected |