Class EnemyExtraDamager
Applies extra damage to an enemy on Trigger (such as Spore damage or Dung damage)
Namespace: WeaverCore.Assets.Components
Assembly: WeaverCore.dll
Syntax
public class EnemyExtraDamager : MonoBehaviour
Fields
| Edit this page View SourceDEFAULT_RECURSION_DEPTH
Declaration
public const int DEFAULT_RECURSION_DEPTH = 3
Field Value
Type | Description |
---|---|
int |
damageType
The type of damage to deal
Declaration
public ExtraDamageTypes damageType
Field Value
Type | Description |
---|---|
ExtraDamageTypes |
Methods
| Edit this page View SourceHitEnemy(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 |
OnCollisionEnter2D(Collision2D)
Declaration
protected virtual void OnCollisionEnter2D(Collision2D collision)
Parameters
Type | Name | Description |
---|---|---|
Collision2D | collision |
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 |
OnTriggerEnter2D(Collider2D)
Declaration
protected virtual void OnTriggerEnter2D(Collider2D collider)
Parameters
Type | Name | Description |
---|---|---|
Collider2D | collider |