new NPC(x, y, key)
Parameters:
| Name | Type | Description | 
|---|---|---|
| x | any | |
| y | any | |
| key | any | 
- Source:
Members
- 
    dislike
- 
    
    For all NPCs, I am defaulting the people they dislike to monsters. This will be overridden inMonster.- Source:
 
- 
    dislike
- 
    
    For all NPCs, I am defaulting the people they dislike to monsters. This will be overridden inMonster.- Source:
 
- 
    maxHP
- 
    
    NPC Health. Setting max HP to 100 by default. - Source:
 
- 
    maxHP
- 
    
    NPC Health. Setting max HP to 100 by default. - Source:
 
- 
    type
- 
    
    Type of Entity - Source:
 
- 
    type
- 
    
    Type of Entity - Source:
 
Methods
- 
    aggro(target, navMesh [, sprint]) → {boolean}
- 
    
    Make the npc attack a target Parameters:Name Type Argument Description targetEntity target to attack navMeshnavmesh the navMesh of the map sprintboolean <optional> 
 the navMesh of the map - Source:
 Returns:target no longer exists (probably dead) - Type
- boolean
 
- 
    aggro(target, navMesh [, sprint]) → {boolean}
- 
    
    Make the npc attack a target Parameters:Name Type Argument Description targetEntity target to attack navMeshnavmesh the navMesh of the map sprintboolean <optional> 
 the navMesh of the map - Source:
 Returns:target no longer exists (probably dead) - Type
- boolean
 
- 
    gotoXY(x, y, navMesh, sprint) → {boolean}
- 
    
    This function tells an entity object to travel to a desired location Parameters:Name Type Description xnumber ynumber navMeshnavMesh navigation mesh object sprintboolean if true go fast - Source:
 Returns:return true if finished, otherwise false. - Type
- boolean
 
- 
    gotoXY(x, y, navMesh, sprint) → {boolean}
- 
    
    This function tells an entity object to travel to a desired location Parameters:Name Type Description xnumber ynumber navMeshnavMesh navigation mesh object sprintboolean if true go fast - Source:
 Returns:return true if finished, otherwise false. - Type
- boolean
 
- 
    updateAI(navMesh, topLeft, botRight, player, behavior)
- 
    
    
    
    
    
        Parameters:Name Type Description navMeshnavmesh the navMesh of the map topLeftPhaser.Point top left bounds the entity can wander in. botRightPhaser.Point bottom right bounds the entity can wander in. playerEntity the player! behaviorstring neutral or aggresive for now - Source:
 
- 
    updateAI(navMesh, topLeft, botRight, player, behavior)
- 
    
    
    
    
    
        Parameters:Name Type Description navMeshnavmesh the navMesh of the map topLeftPhaser.Point top left bounds the entity can wander in. botRightPhaser.Point bottom right bounds the entity can wander in. playerEntity the player! behaviorstring neutral or aggresive for now - Source:
 
- 
    wander(navMesh, topLeft, botRight)
- 
    
    Allow an Entity object to wander Parameters:Name Type Description navMeshnavMesh the maps navigation mesh topLeftPhaser.Point top left cornor of the bounds (x,y) default 0,0 botRightPhaser.Point bottom left cornor of the bounds (x,y) default map width,hieght - Source:
 
- 
    wander(navMesh, topLeft, botRight)
- 
    
    Allow an Entity object to wander Parameters:Name Type Description navMeshnavMesh the maps navigation mesh topLeftPhaser.Point top left cornor of the bounds (x,y) default 0,0 botRightPhaser.Point bottom left cornor of the bounds (x,y) default map width,hieght - Source: