TopDown Engine
v4.1
|
A basic melee weapon class, that will activate a "hurt zone" when the weapon is used More...
Public Types | |
enum | DamageAreaShapes { DamageAreaShapes.Rectangle, DamageAreaShapes.Circle } |
the shape of the bomb's damage area More... | |
Public Attributes | |
float | TimeBeforeExplosion = 2f |
the delay before the bomb explodes More... | |
GameObject | ExplosionEffect |
a vfx to instantiate when the bomb explodes More... | |
AudioClip | ExplosionSfx |
a sound to play when the bomb explodes More... | |
bool | FlickerSprite = true |
whether or not the sprite should flicker before explosion More... | |
float | TimeBeforeFlicker = 1f |
the duration before the flicker starts More... | |
string | MaterialPropertyName = "_Color" |
the name of the property that should flicker More... | |
Collider2D | DamageAreaCollider |
the collider of the damage area More... | |
float | DamageAreaActiveDuration = 1f |
the duration of the damage area More... | |
Protected Member Functions | |
virtual void | OnEnable () |
On enable, we initialize our bomb More... | |
virtual void | Initialization () |
Initializes the bomb More... | |
virtual void | Update () |
On update, makes our bomb flicker, activates the damage area and destroys the bomb if needed More... | |
virtual void | DestroyBomb () |
Destroys the bomb More... | |
virtual void | InstantiateExplosionEffect () |
Instantiates a VFX at the bomb's position More... | |
virtual void | PlayExplosionSound () |
Plays a sound on explosion More... | |
virtual void | EnableDamageArea () |
Enables the damage area. More... | |
virtual void | DisableDamageArea () |
Disables the damage area. More... | |
Protected Attributes | |
float | _timeSinceStart |
Renderer | _renderer |
MMPoolableObject | _poolableObject |
bool | _flickering |
bool | _damageAreaActive |
Color | _initialColor |
Color | _flickerColor = new Color32(255, 20, 20, 255) |
MaterialPropertyBlock | _propertyBlock |
A basic melee weapon class, that will activate a "hurt zone" when the weapon is used
|
protectedvirtual |
Destroys the bomb
|
protectedvirtual |
Disables the damage area.
|
protectedvirtual |
Enables the damage area.
|
protectedvirtual |
Initializes the bomb
|
protectedvirtual |
Instantiates a VFX at the bomb's position
|
protectedvirtual |
On enable, we initialize our bomb
|
protectedvirtual |
Plays a sound on explosion
|
protectedvirtual |
On update, makes our bomb flicker, activates the damage area and destroys the bomb if needed
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
float MoreMountains.TopDownEngine.Bomb.DamageAreaActiveDuration = 1f |
the duration of the damage area
Collider2D MoreMountains.TopDownEngine.Bomb.DamageAreaCollider |
the collider of the damage area
GameObject MoreMountains.TopDownEngine.Bomb.ExplosionEffect |
a vfx to instantiate when the bomb explodes
AudioClip MoreMountains.TopDownEngine.Bomb.ExplosionSfx |
a sound to play when the bomb explodes
bool MoreMountains.TopDownEngine.Bomb.FlickerSprite = true |
whether or not the sprite should flicker before explosion
string MoreMountains.TopDownEngine.Bomb.MaterialPropertyName = "_Color" |
the name of the property that should flicker
float MoreMountains.TopDownEngine.Bomb.TimeBeforeExplosion = 2f |
the delay before the bomb explodes
float MoreMountains.TopDownEngine.Bomb.TimeBeforeFlicker = 1f |
the duration before the flicker starts