A class used to trigger a damage area zone of the selected shape (rectangle or circle) after the defined time before explosion. Typically used for grenades.
More...
|
virtual void | Explode () |
| Makes the bomb explode, enabling feedbacks and damage area More...
|
|
A class used to trigger a damage area zone of the selected shape (rectangle or circle) after the defined time before explosion. Typically used for grenades.
◆ DamageAreaShapes
the possible types of shapes for damage areas
Enumerator |
---|
Rectangle | |
Circle | |
◆ DestroyBomb()
virtual void MoreMountains.CorgiEngine.Bomb.DestroyBomb |
( |
| ) |
|
|
protectedvirtual |
On destroy we disable our object and handle pools
◆ DisableDamageArea()
virtual void MoreMountains.CorgiEngine.Bomb.DisableDamageArea |
( |
| ) |
|
|
protectedvirtual |
Disables the damage area.
◆ EnableDamageArea()
virtual void MoreMountains.CorgiEngine.Bomb.EnableDamageArea |
( |
| ) |
|
|
protectedvirtual |
◆ Explode()
virtual void MoreMountains.CorgiEngine.Bomb.Explode |
( |
| ) |
|
|
virtual |
Makes the bomb explode, enabling feedbacks and damage area
◆ Initialization()
virtual void MoreMountains.CorgiEngine.Bomb.Initialization |
( |
| ) |
|
|
protectedvirtual |
Grabs renderer and pool components
◆ OnEnable()
virtual void MoreMountains.CorgiEngine.Bomb.OnEnable |
( |
| ) |
|
|
protectedvirtual |
On enable we initialize our bomb
◆ TestExplodeOnContact()
virtual void MoreMountains.CorgiEngine.Bomb.TestExplodeOnContact |
( |
| ) |
|
|
protectedvirtual |
Check if we should explode on contact
◆ Update()
virtual void MoreMountains.CorgiEngine.Bomb.Update |
( |
| ) |
|
|
protectedvirtual |
On Update we handle our cooldowns and activate the bomb if needed
◆ _damageAreaActive
bool MoreMountains.CorgiEngine.Bomb._damageAreaActive |
|
protected |
◆ _exploded
bool MoreMountains.CorgiEngine.Bomb._exploded |
|
protected |
◆ _flickerColor
Color MoreMountains.CorgiEngine.Bomb._flickerColor = new Color32(255, 20, 20, 255) |
|
protected |
◆ _flickering
bool MoreMountains.CorgiEngine.Bomb._flickering |
|
protected |
◆ _hit
RaycastHit2D MoreMountains.CorgiEngine.Bomb._hit |
|
protected |
◆ _initialColor
Color MoreMountains.CorgiEngine.Bomb._initialColor |
|
protected |
◆ _rendererIsNotNull
bool MoreMountains.CorgiEngine.Bomb._rendererIsNotNull |
|
protected |
◆ _timeSinceExplosion
float MoreMountains.CorgiEngine.Bomb._timeSinceExplosion |
|
protected |
◆ _timeSinceStart
float MoreMountains.CorgiEngine.Bomb._timeSinceStart |
|
protected |
◆ DamageAreaActiveDuration
float MoreMountains.CorgiEngine.Bomb.DamageAreaActiveDuration = 1f |
the duration (in seconds) during which the damage area should be active
◆ DamageAreaCollider
Collider2D MoreMountains.CorgiEngine.Bomb.DamageAreaCollider |
the collider that defines the damage area
◆ ExplodeOnContact
bool MoreMountains.CorgiEngine.Bomb.ExplodeOnContact = false |
if this is true, the bomb will explode when entering in contact with a collider on a layer that is part of the ExplosionOnContactLayerMask
◆ ExplodeOnContactDetectionRadius
float MoreMountains.CorgiEngine.Bomb.ExplodeOnContactDetectionRadius = 1f |
the radius (from this object) within which we'll check for colliders on the ExplosionOnContactLayerMask
◆ ExplosionFeedback
MMFeedbacks MoreMountains.CorgiEngine.Bomb.ExplosionFeedback |
the MMFeedbacks to trigger on explosion
◆ ExplosionOnContactLayerMask
LayerMask MoreMountains.CorgiEngine.Bomb.ExplosionOnContactLayerMask |
the layer, or layers, this bomb should explode on contact with
◆ FlickerSprite
bool MoreMountains.CorgiEngine.Bomb.FlickerSprite = true |
whether or not the sprite attached to this bomb should flicker before exploding
◆ TargetPoolableObject
the poolable object component this script will pilot - if left empty, will try to grab this component on itself
◆ TargetRenderer
Renderer MoreMountains.CorgiEngine.Bomb.TargetRenderer |
the renderer this script will pilot - if left empty, will try to grab this component on itself
◆ TimeBeforeExplosion
float MoreMountains.CorgiEngine.Bomb.TimeBeforeExplosion = 2f |
the duration(in seconds) before the explosion
◆ TimeBeforeFlicker
float MoreMountains.CorgiEngine.Bomb.TimeBeforeFlicker = 1f |
the time (in seconds) before the flicker
The documentation for this class was generated from the following file:
- Assets/CorgiEngine/Common/Scripts/Agents/Weapons/Bomb.cs