A basic damage implementation. Call a function on death. Allow for respawning.
More...
|
| virtual void | DealDamage (float damageAmount) |
| |
| virtual void | DealDamage (float damageAmount, Vector3? hitPosition=null, Vector3? hitNormal=null, bool reactToHit=true, GameObject sender=null, GameObject receiver=null) |
| |
| virtual void | DestroyThis () |
| |
A basic damage implementation. Call a function on death. Allow for respawning.
◆ DealDamage() [1/2]
| virtual void BNG.Damageable.DealDamage |
( |
float |
damageAmount | ) |
|
|
virtual |
◆ DealDamage() [2/2]
| virtual void BNG.Damageable.DealDamage |
( |
float |
damageAmount, |
|
|
Vector3? |
hitPosition = null, |
|
|
Vector3? |
hitNormal = null, |
|
|
bool |
reactToHit = true, |
|
|
GameObject |
sender = null, |
|
|
GameObject |
receiver = null |
|
) |
| |
|
virtual |
◆ DestroyThis()
| virtual void BNG.Damageable.DestroyThis |
( |
| ) |
|
|
virtual |
◆ ActivateGameObjectsOnDeath
| List<GameObject> BNG.Damageable.ActivateGameObjectsOnDeath |
◆ DeactivateCollidersOnDeath
| List<Collider> BNG.Damageable.DeactivateCollidersOnDeath |
◆ DeactivateGameObjectsOnDeath
| List<GameObject> BNG.Damageable.DeactivateGameObjectsOnDeath |
◆ DestroyDelay
| float BNG.Damageable.DestroyDelay = 0f |
How long to wait before destroying this objects.
◆ DestroyOnDeath
| bool BNG.Damageable.DestroyOnDeath = true |
Destroy this object on Death? False if need to respawn.
◆ DropOnDeath
| bool BNG.Damageable.DropOnDeath = true |
◆ Health
| float BNG.Damageable.Health = 100 |
◆ onDamaged
◆ onDestroyed
| UnityEvent BNG.Damageable.onDestroyed |
◆ onRespawn
| UnityEvent BNG.Damageable.onRespawn |
◆ RemoveBulletHolesOnDeath
| bool BNG.Damageable.RemoveBulletHolesOnDeath = true |
Remove any decals that were parented to this object on death. Useful for clearing unused decals.
◆ Respawn
| bool BNG.Damageable.Respawn = false |
If true the object will be reactivated according to RespawnTime.
◆ RespawnTime
| float BNG.Damageable.RespawnTime = 10f |
If Respawn true, this gameObject will reactivate after RespawnTime. In seconds.
◆ SpawnOnDeath
| GameObject BNG.Damageable.SpawnOnDeath |
The documentation for this class was generated from the following file: