Class IAttackEffect
Represents the effects of an attack, including damage, sound effects and visual effects.
Namespace: AutoBattleFramework.Skills
Assembly: cs.temp.dll.dll
Syntax
public abstract class IAttackEffect : ScriptableObject
Fields
ai
Attacking GameCharacter.
Declaration
protected GameCharacter ai
Field Value
Type | Description |
---|---|
GameCharacter |
DamageType
Type of damage of the attack
Declaration
public BattleFormulas.DamageType DamageType
Field Value
Type | Description |
---|---|
BattleFormulas.DamageType |
DoubleAnimation
If the attack uses two separated animations. For example, aim with an arrow and shoot.
Declaration
public bool DoubleAnimation
Field Value
Type | Description |
---|---|
Boolean |
EffectDescription
Description of the efffect
Declaration
public string EffectDescription
Field Value
Type | Description |
---|---|
String |
EffectImage
Image depicting the attack. Used in the description of the character's statistics.
Declaration
public Sprite EffectImage
Field Value
Type | Description |
---|---|
Sprite |
OnHitEffects
List of On-Hit Effects associated to the Attack Effect.
Declaration
public List<OnHitEffect> OnHitEffects
Field Value
Type | Description |
---|---|
List<OnHitEffect> |
Methods
Attack(GameCharacter, Transform)
On attack method. For example, a simple melee attack will call the OnHit method, while an ranged effect should spawn a Projectile.
Declaration
public abstract void Attack(GameCharacter ai, Transform shootingPoint)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | ai | Attacking GameCharacter |
Transform | shootingPoint | The transform from which the projectile will be launched. |
OnHit(GameCharacter)
On hit effect. It should call a method that subtracts life from the target, like the ones in BattleFormulas.
Declaration
public abstract void OnHit(GameCharacter target)
Parameters
Type | Name | Description |
---|---|---|
GameCharacter | target | The target of the character of projectile. |