Show / Hide Table of Contents

Class EnemyExtraDamager

Applies extra damage to an enemy on Trigger (such as Spore damage or Dung damage)

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
EnemyExtraDamager
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class EnemyExtraDamager : MonoBehaviour

Fields

| Edit this page View Source

DEFAULT_RECURSION_DEPTH

Declaration
public const int DEFAULT_RECURSION_DEPTH = 3
Field Value
Type Description
int
| Edit this page View Source

damageType

The type of damage to deal

Declaration
public ExtraDamageTypes damageType
Field Value
Type Description
ExtraDamageTypes

Methods

| Edit this page View Source

HitEnemy(Transform, ExtraDamageTypes, Action<IExtraDamageable>)

Applies extra damage to an enemy (such as Spore damage or Dung damage)

Declaration
public static void HitEnemy(Transform obj, ExtraDamageTypes damageType, Action<IExtraDamageable> onHit = null)
Parameters
Type Name Description
Transform obj

The transform of the enemy to hit

ExtraDamageTypes damageType

The type of damage to deal

Action<IExtraDamageable> onHit

Called when the enemy was sucessfully hit

| Edit this page View Source

OnCollisionEnter2D(Collision2D)

Declaration
protected virtual void OnCollisionEnter2D(Collision2D collision)
Parameters
Type Name Description
Collision2D collision
| Edit this page View Source

OnExtraDamage(IExtraDamageable)

Called when an enemy was sucessfully hit

Declaration
protected virtual void OnExtraDamage(IExtraDamageable hitEnemy)
Parameters
Type Name Description
IExtraDamageable hitEnemy

The enemy that was hit

| Edit this page View Source

OnTriggerEnter2D(Collider2D)

Declaration
protected virtual void OnTriggerEnter2D(Collider2D collider)
Parameters
Type Name Description
Collider2D collider

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
☀
☾