Свойство | Type | Description | |
---|---|---|---|
_actors | List |
||
_dungeonname | string | ||
_exits | List |
||
_floorFile | string | ||
_height | int | ||
_id | int | ||
_level | int | ||
_light | int | ||
_music | string | ||
_name | string | ||
_tiles | List
|
||
_updateTiles | HashSet |
||
_wallFile | string | ||
_width | int |
Méthode | Description | |
---|---|---|
AssignPlayer ( string GUID = "" ) : int |
Method to add the player character in the current map(room)
|
|
CanMove ( Coords currentPos, Direction dir ) : bool |
Check whether it is possible to move from a certain place on a map in a certain direction
|
|
ClearActors ( ) : void | ||
ClosestEnemy ( Coords coords, int radius = 4, bool includePlayer = true, bool includeNPC = true, bool includeEnemy = true ) : Backend.Coords |
Get coordinates for closest enemy within a specified radius
|
|
DirectionTile ( Coords start, Direction dir ) : Backend.Coords |
Get coordinates for next tile in a certain direction
|
|
Dispose ( ) : void |
Clean up: Remove all List objects manually (avoid garbage collection)
|
|
ExitToEntry ( int ToRoom, List |
Switch Entrance and Exit in a list of exit-objects (for corresponding rooms)
|
|
FromXML ( string input, Backend targetCoords = null, bool resetPlayer = false ) : void |
|
|
GetCheckpointCoords ( ) : Backend.Coords |
Get coordinates of checkpoint on map (if any)
|
|
HandleEvent ( bool DownStream, Events eventID ) : void |
Event Handling (implementation of IHandleEvent)
|
|
Load ( string filename, Backend targetCoords = null, bool resetPlayer = false, string subdir = "save\\auto\\" ) : void |
|
|
Map ( ) : System |
Basic constructor (creating an empty map)
|
|
Map ( IHandleEvent parent, string filename = "", Backend playerPos = null ) : System |
Constructor for a loading a map from a file
|
|
MoveActor ( |
Move an actor on the map in a specified direction (does not check for walls - use CanMove)
|
|
NextDirection ( Direction dir, bool directOnly = false ) : Direction |
Turns around clockwise (i.e. Up->Right->Down->Left->Up)
|
|
OppositeDirection ( Direction dir ) : Direction |
Find the exact opposite facing of a direction
|
|
PathTo ( Coords from, Backend to, List |
Find a path between two tiles (not necessarily only or shortest route!)
|
|
PositionActor ( |
Move an actor on the map in a specified direction (does not check for walls - use CanMove)
|
|
ReadXML ( |
Load a map from a file
|
|
Save ( string filename, string subdir = "save\\auto\\" ) : void |
Write the current map to a file
|
|
TileByCoords ( Coords coords ) : |
Get tile specified by a coords-object (deprecated, use direct access by map[])
|
|
ToString ( ) : string |
Display map & walls in text form
|
|
ToXML ( ) : string |
Get the current Map as an XML-String
|
|
Uncover ( Coords coords, int radius = 4 ) : void |
Make a square-shaped area of a specified radius visible on minimap
|
|
Update ( |
Refresh tiles which do something (traps, enemies, NPCs)
|
|
WhichWayIs ( Coords from, Backend to, bool DirectOnly = false ) : Direction |
Determine which way one square is from another
|
|
firstActorID ( int x, int y ) : int |
Get ID of first actor on a specified tile
|
|
this ( Coords coords ) : |
Get the tile at coordinates specified by a coords-object
|
|
this ( int x, int y ) : |
Get the tile at coordinates x and y
|
public AssignPlayer ( string GUID = "" ) : int | ||
GUID | string | |
Résultat | int |
public CanMove ( Coords currentPos, Direction dir ) : bool | ||
currentPos | Coords | Coordinates on current map |
dir | Direction | Direction to move to |
Résultat | bool |
public ClosestEnemy ( Coords coords, int radius = 4, bool includePlayer = true, bool includeNPC = true, bool includeEnemy = true ) : Backend.Coords | ||
coords | Coords | Center point to start checking from |
radius | int | Number of squares to move up/left/right/down |
includePlayer | bool | true if player should be an "enemy" |
includeNPC | bool | true if NPCs should be "enemies" |
includeEnemy | bool | true if monsters should be "enemies" |
Résultat | Backend.Coords |
public static DirectionTile ( Coords start, Direction dir ) : Backend.Coords | ||
start | Coords | Current tile |
dir | Direction | Direction to look at |
Résultat | Backend.Coords |
public static ExitToEntry ( int ToRoom, List |
||
ToRoom | int | Which room to switch |
exits | List |
List of exits |
Résultat | List |
public FromXML ( string input, Backend targetCoords = null, bool resetPlayer = false ) : void | ||
input | string | |
targetCoords | Backend | |
resetPlayer | bool | |
Résultat | void |
public GetCheckpointCoords ( ) : Backend.Coords | ||
Résultat | Backend.Coords |
public HandleEvent ( bool DownStream, Events eventID ) : void | ||
DownStream | bool | true if message is meant for children; false if it is meant for parents |
eventID | Events | Unique ID of the event |
Résultat | void |
public Load ( string filename, Backend targetCoords = null, bool resetPlayer = false, string subdir = "save\\auto\\" ) : void | ||
filename | string | |
targetCoords | Backend | |
resetPlayer | bool | |
subdir | string | |
Résultat | void |
public Map ( IHandleEvent parent, string filename = "", Backend playerPos = null ) : System | ||
parent | IHandleEvent | An event handler to pass events to |
filename | string | Filename of XML-file containing map data |
playerPos | Backend | Coordinates of player on map |
Résultat | System |
public MoveActor ( |
||
actor | The actor object to move | |
dir | Direction | Direction to move to |
Résultat | void |
public static NextDirection ( Direction dir, bool directOnly = false ) : Direction | ||
dir | Direction | Start direction |
directOnly | bool | true if diagonals should not be allowed |
Résultat | Direction |
public static OppositeDirection ( Direction dir ) : Direction | ||
dir | Direction | Direction to start |
Résultat | Direction |
public PathTo ( Coords from, Backend to, List |
||
from | Coords | Tile to start from |
to | Backend | Tile to move to |
result | List |
List to put result path into |
visited | HashSet |
TIles visited on current path (avoid circles) |
maxlength | int | Maximum length of path |
Résultat | void |
public PositionActor ( |
||
actor | The actor object to move | |
coords | Coords | |
Résultat | void |
public ReadXML ( |
||
xmlr | ||
targetCoords | Backend | |
resetPlayer | bool | |
Résultat | void |
public Save ( string filename, string subdir = "save\\auto\\" ) : void | ||
filename | string | The filename to write to |
subdir | string | |
Résultat | void |
public TileByCoords ( Coords coords ) : |
||
coords | Coords | Coordinates of tile |
Résultat |
public Uncover ( Coords coords, int radius = 4 ) : void | ||
coords | Coords | Center point |
radius | int | steps to move up/left/right/down |
Résultat | void |
public Update ( |
||
gameTime | ||
Résultat | void |
public static WhichWayIs ( Coords from, Backend to, bool DirectOnly = false ) : Direction | ||
from | Coords | Source square |
to | Backend | Target Square |
DirectOnly | bool | false (default) if diagonals are allowed |
Résultat | Direction |
public firstActorID ( int x, int y ) : int | ||
x | int | x-coordinates of tile |
y | int | y-coordinates of tile |
Résultat | int |
public this ( Coords coords ) : |
||
coords | Coords | Coordinate object specifying the tile |
Résultat |
public this ( int x, int y ) : |
||
x | int | The x-coordinate |
y | int | The y-coordinate |
Résultat |