-
<inner> autoPilot()
-
Move player one step towards the stairs (used to test pathing)
-
<inner> create()
-
Initialize the phaser game
-
<inner> createDungeon()
-
Generate a new floor
i.e. place tiles, walls, doors, monsters, items, stairs
-
<inner> createPlayer()
-
Create the player and place its sprite, and attach the camera to it
-
<inner> createWorld()
-
Create the dungeon and player
-
<inner> gofull()
-
Full screen
-
<inner> mouseClicked()
-
Take action on a tile, or cancel the current action
-
<inner> movePlayer(x, y) → {promise}
-
Add (x, y) to the player's position if it is a valid move
Parameters:
| Name |
Type |
Description |
x |
number
|
|
y |
number
|
|
Returns:
-
Type
-
promise
-
<inner> moveToTile(x, y)
-
Attempt to traverse the entire path to (x, y)
Parameters:
| Name |
Type |
Description |
x |
number
|
|
y |
number
|
|
-
<inner> moveTowardsTile(x, y)
-
Move one step towards (x, y), if it is a valid tile
Parameters:
| Name |
Type |
Description |
x |
number
|
|
y |
number
|
|
-
<inner> placeTile(tile)
-
Place a tile at (x, y)
Parameters:
| Name |
Type |
Description |
tile |
number
|
tilesheet index |
|
|
|
|
|
|
-
<inner> removeTiles()
-
Remove all tiles / sprites
-
<inner> render()
-
Where each frame is rendered
-
<inner> update()
-
Handle input / animations
-
<inner> updateMarker()
-
Move the black marker box to the mouse's position in the map