import Npc from 'WTF-Adventure/WTF-Adventure/client/entity/character/npc/npc.js'
Constructor Summary
Public Constructor | ||
public |
constructor(id: Number, kind: String, label: String) Default constructor |
Member Summary
Public Members | ||
public |
Index for this NPC |
|
public |
Type of this character |
Method Summary
Public Methods | ||
public |
Set the messages for this character, return a single message |
Inherited Summary
From class Entity | ||
public |
Angle of the entity |
|
public |
[angled description] |
|
public |
Animations for the sprite |
|
public |
Timeout function for blinking |
|
public |
Count down time |
|
public |
Current counter |
|
public |
Critical health |
|
public |
Current animation the sprite should be playing |
|
public |
Set if the entity is dirty |
|
public |
Callback for when the entity is dirty |
|
public |
Whether or not this is fading |
|
public |
Fading time |
|
public |
Grid X position |
|
public |
Grid Y position |
|
public |
Handler for the entity |
|
public |
Has a counter |
|
public |
Hurt sprite name |
|
public |
Entity id |
|
public |
Label for the entity |
|
public |
Name of the entity |
|
public |
Non pathable |
|
public |
Normal sprite name |
|
public |
Path |
|
public |
CAllback function when the entity is ready |
|
public |
Rendering data |
|
public |
Has a shadow |
|
public |
Offset for the shadow on the Y axis |
|
public |
Sprite |
|
public |
Whether or not to flip the sprite on the X axis |
|
public |
Whether or not to flip the sprite on the Y axis |
|
public |
Whether or not the sprite has been loaded |
|
public |
Stunned status |
|
public |
Terror status |
|
public |
Wehther or not this entity is visible |
|
public |
X coordinate |
|
public |
Y coordinate |
|
public |
Tell this entity to start blinking |
|
public |
Tell this to fade in given the duration |
|
public |
getAnimationByName(name: String): Animation | null Look for an animtions list for this specific animation given it's name |
|
public |
getCoordDistance(toX: Number, toY: Number): Number Get the distance from this entity to the given x,y coordinates |
|
public |
getDistance(entity: Entity): Number Get the distance from this entity to another entity |
|
public |
Returns the name of the sprite |
|
public |
Check if this entity currently has a path |
|
public |
Check whether or not this entity has a shadow |
|
public |
hasWeapon(): Item | Projectile Returns the instance of the weapon this entity has |
|
public |
inAttackRadius(entity: Entity): Boolean Figure out if this entity is within the attack radius of the given entity |
|
public |
inExtraAttackRadius(entity: Entity): Boolean Figure out if this entity is within the extended attack radius of the given entity |
|
public |
isPositionAdjacent(x: Number, y: Number, ignoreDiagonals: Boolean): Boolean Checks to see if the x,y coordinate is adjacent to the entity's current position |
|
public |
Check whether or not this entity is visible |
|
public |
This is important for when the client is on a mobile screen. |
|
public |
When this entity's is dirty (mobile) use this callback |
|
public |
When this entity's sprite is loaded trigger this callback |
|
public |
setAnimation(name: String, speed: Number, count: Number, onEndCount: Number) Set the animation on this entity |
|
public |
setCountdown(count: Number) Set the count for the count down time |
|
public |
setGridPosition(x: Number, y: Number) Set the x,y position of the entity on the tile grid |
|
public |
Set the entity's name |
|
public |
setPosition(x: Number, y: [type]) Set the x,y position for the entity |
|
public |
Set the sprite for this entity |
|
public |
setVisible(visible: Boolean) Set the visibility on this entity |
|
public |
Tell the entity to stop blinking and force it to be visible |
|
public |
Toggle the current visibility of this entity |
From class Character | ||
public |
Object of adjacent tiles while pathing |
|
public |
Attack animation speed |
|
public |
What is their attack range |
|
public |
An array of things trying to attack them |
|
public |
Are they attacking something |
|
public |
Before step callback |
|
public |
Did they get a critical hit |
|
public |
Global critical animation |
|
public |
Are they dead |
|
public |
destination: {gridX: Number, gridY: Number} The X and Y locations of the destination |
|
public |
Did they explode |
|
public |
Global explosion animation |
|
public |
Are they following something |
|
public |
If this character's pathing is being forced |
|
public |
Are they frozen |
|
public |
Does their health reset after time is up |
|
public |
Is there health bar visible or not |
|
public |
How many hit points they have left |
|
public |
Hit points callback |
|
public |
Idle animation speed |
|
public |
Should their action be interrupted |
|
public |
How much magic they have left |
|
public |
How many hit points they have total |
|
public |
How much magic they have total |
|
public |
Move callback |
|
public |
Movement transitions |
|
public |
Movement animation speed |
|
public |
Location of a new destination during pathing |
|
public |
Next grid X position |
|
public |
Next grid Y position |
|
public |
orientation: Orientation The direction they are pointing |
|
public |
path: Astar What is their current path |
|
public |
Previous gridX position |
|
public |
Previous gridY position |
|
public |
Request path callback |
|
public |
Second step callback |
|
public |
Do they have a shadow |
|
public |
Flip the sprite along the X axis |
|
public |
Flip the sprite along the Y axis |
|
public |
Start pathing callback |
|
public |
Default step number |
|
public |
Step callback |
|
public |
Stop pathing callback |
|
public |
Global stun animation |
|
public |
Are they stunned |
|
public |
What is their current target |
|
public |
If this character is in terror |
|
public |
Global terror animation |
|
public |
Walk animation speed |
|
public |
Do they have a weapon |
|
public |
addAttacker(character: Character): Boolean Add an attacker to a character |
|
public |
Animate the character depending on their current orientation |
|
public |
Attack a specific character |
|
public |
backOff() Stop following or attacking another character |
|
public |
changedPath(): [type] Returns true if they've changed paths |
|
public |
Clear the health bar from the screen |
|
public |
Follow a specific character |
|
public |
followPath(path: Array): Boolean Taken from TTA - this is to ensure the player does not click on himself or somehow into another dimension |
|
public |
forEachAttacker(callback: Function) Apply a callback to each attacker |
|
public |
forget() Removes all attakers |
|
public |
Return the active effect on the character |
|
public |
Get the correct effect animation |
|
public |
Go to a specific x,y value |
|
public |
hasAttacker(character: Character): Boolean Check if they are already being attacked by this character |
|
public |
Returns true if they have a next path step |
|
public |
Returns true if they have a path |
|
public |
Returns true if they have a shadow |
|
public |
Returns true if they are targeting someone |
|
public |
Returns true if they have a weapon |
|
public |
Set the idle animation and optional orientation direction |
|
public |
Check if they are being attacked |
|
public |
Check if the character is currently moving |
|
public |
Load all global character animations |
|
public |
Look at a specific character |
|
public |
Move the character to a new location |
|
public |
moved() The character has moved, trigger the move callback if there is one |
|
public |
We can have the movement remain client side because the server side will be responsible for determining whether or not the player should have reached the location and ban all hackers. |
|
public |
onBeforeStep(callback: Function) Before a pathing step callback |
|
public |
onHitPoints(callback: Function) On hit points callback |
|
public |
On move callback |
|
public |
onRequestPath(callback: Function) Callback for path requested |
|
public |
onSecondStep(callback: Function) Second step callback |
|
public |
onStartPathing(callback: Function) Start pathing callback |
|
public |
Pathing step callback |
|
public |
onStopPathing(callback: Function) Stop pathing callback |
|
public |
performAction(orientation: Number, action: Number) Set a specific animation action |
|
public |
Set a new destination during movement somewhere |
|
public |
removeAttacker(character: Character): Boolean Removes an attacker from a character |
|
public |
Returns true if the target was removed |
|
public |
requestPathfinding(x: Number, y: Number): Array Request path finding from current position to this position |
|
public |
setHitPoints(hitPoints: Number) Set the character's hit points then triggers hitPointsCallback |
|
public |
setMaxHitPoints(maxHitPoints: Number) Set the character's maximum hit points |
|
public |
setOrientation(orientation: String) Set the character's orientation |
|
public |
Sets a target for this character |
|
public |
Stop the character movement |
|
public |
The triggered health bar (currently fighting) |
|
public |
Update the character's position on the grid |
|
public |
Update movement on the path |