Show / Hide Table of Contents

Class BasicDeathEffects

Contains the most basic effects that are played on death. These are effects that virtually all enemies share

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
BasicDeathEffects
InfectedDeathEffects
UninfectedDeathEffects
Implements
IDeathEffects
Namespace: WeaverCore.Components.DeathEffects
Assembly: WeaverCore.dll
Syntax
public class BasicDeathEffects : MonoBehaviour, IDeathEffects

Fields

| Edit this page View Source

DamageSound

Declaration
[Header("Audio")]
[SerializeField]
protected AudioClip DamageSound
Field Value
Type Description
AudioClip
| Edit this page View Source

EffectsOffset

Declaration
[Space]
[SerializeField]
[Tooltip("An positional offset applied to the effects when played")]
public Vector3 EffectsOffset
Field Value
Type Description
Vector3
| Edit this page View Source

FreezeGameOnDeath

Declaration
[Tooltip("If set to true, the game will briefly slow down when playing the death effects")]
public bool FreezeGameOnDeath
Field Value
Type Description
bool
| Edit this page View Source

JournalEntryName

Declaration
[Header("Config")]
[Tooltip("The journal entry to unlock when the death effects are played")]
public string JournalEntryName
Field Value
Type Description
string
| Edit this page View Source

SwordDeathSound

Declaration
[SerializeField]
protected AudioClip SwordDeathSound
Field Value
Type Description
AudioClip
| Edit this page View Source

damageSoundMaxPitch

Declaration
[SerializeField]
protected float damageSoundMaxPitch
Field Value
Type Description
float
| Edit this page View Source

damageSoundMinPitch

Declaration
[SerializeField]
protected float damageSoundMinPitch
Field Value
Type Description
float
| Edit this page View Source

damageSoundVolume

Declaration
[SerializeField]
protected float damageSoundVolume
Field Value
Type Description
float
| Edit this page View Source

swordDeathSoundMaxPitch

Declaration
[SerializeField]
protected float swordDeathSoundMaxPitch
Field Value
Type Description
float
| Edit this page View Source

swordDeathSoundMinPitch

Declaration
[SerializeField]
protected float swordDeathSoundMinPitch
Field Value
Type Description
float
| Edit this page View Source

swordDeathSoundVolume

Declaration
[SerializeField]
protected float swordDeathSoundVolume
Field Value
Type Description
float

Properties

| Edit this page View Source

HasBeenPlayed

Have the death effects been played already?

Declaration
public bool HasBeenPlayed { get; protected set; }
Property Value
Type Description
bool

Methods

| Edit this page View Source

Awake()

Declaration
protected virtual void Awake()
| Edit this page View Source

DoEssenceChance()

Will randomly check if the player should receive essence from killing an enemy.

Declaration
public bool DoEssenceChance()
Returns
Type Description
bool

Returns true if the player shouuld receive essence

| Edit this page View Source

EmitEffects()

Used for playing the death effects

Declaration
public virtual void EmitEffects()
| Edit this page View Source

EmitEssenceParticles()

Declaration
protected void EmitEssenceParticles()
| Edit this page View Source

EmitSounds()

Used for playing the death sound effects

Declaration
public virtual void EmitSounds()
| Edit this page View Source

OnValidate()

Declaration
protected virtual void OnValidate()
| Edit this page View Source

PlayDeathEffects(HitInfo)

Plays the death effects

Declaration
public virtual void PlayDeathEffects(HitInfo finalBlow)
Parameters
Type Name Description
HitInfo finalBlow

The final blow to the enemy

| Edit this page View Source

ShakeCameraIfVisible(ShakeType)

Declaration
protected void ShakeCameraIfVisible(ShakeType shakeType = ShakeType.EnemyKillShake)
Parameters
Type Name Description
ShakeType shakeType

Implements

IDeathEffects

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾