new Maze_Controller()
Controller class for the 3D maze. It handles events' and player's movements, and the compass.
- Source:
Methods
checkPassage(x, y, tileX, tileY) → {boolean}
Checks if a position is occupied.
Parameters:
| Name | Type | Description |
|---|---|---|
x |
Not used, reserved for future use. |
|
y |
Not used, reserved for future use. |
|
tileX |
X coordinate (in Game_Map coordinate system) to check. |
|
tileY |
Y coordinate (in Game_Map coordinate system) to check. |
- Source:
Returns:
True if the position is passable.
- Type
- boolean
createEvents()
Creates maze events from $gameMap's events.
- Source:
drawCompass(bitmap, x, y, radius, bgColor, pointingColor, opposingColor)
Draws a compass.
Parameters:
| Name | Type | Description |
|---|---|---|
bitmap |
Bitmap on which the compass will be drawn. |
|
x |
Compass center's x coordinate. |
|
y |
Compass center's y coordinate. |
|
radius |
Compass radius. |
|
bgColor |
Background color of the compass. |
|
pointingColor |
Color of the half needle pointing the destination. |
|
opposingColor |
Color of the half needle opposite to the destination. |
- Source:
initialize(cameraDistance, cameraWidth, speed, rotationSpeed)
Creates player and events.
Parameters:
| Name | Type | Description |
|---|---|---|
cameraDistance |
Player's camera distance. |
|
cameraWidth |
Player's camera width. |
|
speed |
Player's speed. |
|
rotationSpeed |
Player's rotation speed. |
- Source:
reset()
Resets the maze.
- Source:
update()
Updates player, events and compass direction.
The compass will point to the vector sum of each
An event's pull on the compass is calculated as its strength (goal events have strength set to 1) divided by the square of the distance from the player (i.e. closer events will exert a stronger pull).
- Source: