-
Notifications
You must be signed in to change notification settings - Fork 2
Fight component documentation
This page covers the FightComponent
class, along with all of the FightAnimation
classes that can be added.
This component allows an entity to fight with and attack other entities.
The constructor takes a single JavaScript object with the following properties:
Name | Type | Description |
---|---|---|
damage |
int |
The amount of damage that the entity inflicts with each attack. |
animation |
FightAnimation |
The animation that is carried out during each attack. |
biteRange |
float |
How far the entity can bite from. |
takesRevenge |
boolean |
True if the entity fights back after being attacked. A life component is required if this is true. |
pauseTime |
float |
How long the entity waits between attacks. |
The following animations can be added to a fight component to change how the entity carries out attacks.
Causes the entity to lunge at its target when attacking. The constructor is empty, e.g. new LungeAnimation()
.
Causes the entity to "sting" its target like a bee when attacking. The constructor is empty, e.g. new StingAnimation()
.
Thanks for visiting this wiki. Don't forget to check out Equilinox!
The wiki and the modding framework are still heavily under development, so not all content is available yet.