Méthode | Description | |
---|---|---|
AddBoss ( ) : void |
Method to add a boss enemy to a room. A boss is more powerful than a normal enemy and the room gets a special sound if there is a boss in it.
|
|
AddCheckpoint ( ) : void |
Method to add the CheckpointTiles to a room.
|
|
AddDoors ( int roomID = 1, int maxRoom = 3, List |
Method to add a door to the next level to a room.
|
|
AddEnemies ( int amount = -1 ) : void |
Method to generate the enemys for a room. The method places enemys at free position and initializes them.
|
|
AddItems ( int amount = -1 ) : void |
Method to place some random items in a room.
|
|
AddNPC ( int amount = -1 ) : void |
Method to add NPCs in a room. By default the NPCs have some money and a dialogue.
|
|
AddPlayer ( Coords pos ) : void |
Method to add the player to a room.
|
|
AddShop ( ) : void |
Method to add a shop to the map. The method adds a NPC with a shop and some custom tiles around him.
|
|
AddStairs ( Coords srcCoords, int targetRoom, Backend targetCoords, bool up ) : void |
Method to add the stairs to the next level to a room.
|
|
AddTarget ( Coords srcCoords ) : void |
Method to add the TargetTile to a room (usually a room in the highest level). The Target is surrounded by walls and a door.
|
|
AddTraps ( int amount = -1 ) : void |
Method to add some TrapTiles to a room.
|
|
CleanupRoom ( ) : void | ||
ClearMaze ( ) : void |
Create a grid of walls
|
|
ClearTile ( int x, int y ) : void |
Remove all elements from a tile
|
|
ClearWalls ( int amount = -1 ) : void |
Remove walls at random for more space
|
|
ConnectTo ( Coords from, int Room, Backend to, bool isTeleport = false ) : void |
Add a doorway / stairway / teleporter to another room
|
|
DrawWalls ( ) : void |
Method to add the outer walls to a room.
|
|
FromString ( string input, int roomID, int MaxRoom ) : bool |
Method to generate a room from a string (e.g. a .txt)
|
|
GenerateDungeon ( ) : void |
Method to choose a name for the dungeon.
|
|
GenerateMaze ( ) : void |
Create a new maze
|
|
GenerateRoomName ( ) : void |
Method to choose a name for a room.
|
|
Generator ( object parent = null, int width = 10, int height = 10, bool generate = false, Backend playerPos = null, int roomNr = 1, int maxRoom = 3, |
Create an empty map
|
|
Generator ( object parent, string pattern, int roomNr = 1, int maxRoom = 3, List |
The constructor for the Generator.
|
|
HasExit ( Direction dir ) : bool |
Method to check whether there is a connection to another room.
|
|
Save ( string filename, string subdir = "save\\auto\\" ) : void |
Write the current map to a file
|
|
SuggestExit ( Direction dir ) : Backend.Coords |
Find an appropriate place to put an exit on the map
|
Méthode | Description | |
---|---|---|
_NextTile ( Path &pos ) : void | ||
_Walk ( Path current ) : Path |
Get the next tile based on included Connection info
|
public AddDoors ( int roomID = 1, int maxRoom = 3, List |
||
roomID | int | |
maxRoom | int | |
doors | List |
|
Résultat | void |
public AddEnemies ( int amount = -1 ) : void | ||
amount | int | The number of enemys for a room, 5 by default |
Résultat | void |
public AddItems ( int amount = -1 ) : void | ||
amount | int | 5 by default. |
Résultat | void |
public AddNPC ( int amount = -1 ) : void | ||
amount | int | 1 by default |
Résultat | void |
public AddPlayer ( Coords pos ) : void | ||
pos | Coords | The position at which the player will spawn, (1,1) by default |
Résultat | void |
public AddStairs ( Coords srcCoords, int targetRoom, Backend targetCoords, bool up ) : void | ||
srcCoords | Coords | The place where the stairs will get placed |
targetRoom | int | The number of the room the stairs lead to |
targetCoords | Backend | The coords of the stairs in the next room |
up | bool | Upstairs or Downstairs |
Résultat | void |
public AddTarget ( Coords srcCoords ) : void | ||
srcCoords | Coords | The coordinates for the TargetTile |
Résultat | void |
public AddTraps ( int amount = -1 ) : void | ||
amount | int | 5 by default. |
Résultat | void |
public ClearWalls ( int amount = -1 ) : void | ||
amount | int | Amount of walls to remove |
Résultat | void |
public ConnectTo ( Coords from, int Room, Backend to, bool isTeleport = false ) : void | ||
from | Coords | Coordinates in this room |
Room | int | Uinque ID of target room |
to | Backend | Coordinates in target room |
isTeleport | bool | |
Résultat | void |
public FromString ( string input, int roomID, int MaxRoom ) : bool | ||
input | string | The string from which the room will be constructed |
roomID | int | The number of the room. |
MaxRoom | int | The max number of rooms |
Résultat | bool |
public Generator ( object parent = null, int width = 10, int height = 10, bool generate = false, Backend playerPos = null, int roomNr = 1, int maxRoom = 3, |
||
parent | object | |
width | int | The width of the map |
height | int | The height of the map |
generate | bool | |
playerPos | Backend | |
roomNr | int | |
maxRoom | int | |
rnd | ||
dungeonname | string | |
level | int | |
hasShop | bool | |
hasNPC | bool | |
hasBoss | bool | |
Résultat | System |
public Generator ( object parent, string pattern, int roomNr = 1, int maxRoom = 3, List |
||
parent | object | |
pattern | string | |
roomNr | int | |
maxRoom | int | |
exits | List |
|
rnd | ||
Résultat | System |
public Save ( string filename, string subdir = "save\\auto\\" ) : void | ||
filename | string | The filename to write to |
subdir | string | |
Résultat | void |
public SuggestExit ( Direction dir ) : Backend.Coords | ||
dir | Direction | Wall on which exit should be placed |
Résultat | Backend.Coords |