Class Dungeon
The Dungeon contains and manages one or more Encounter objects, and may be associated with other Dungeons.
Inheritance
Inherited Members
Namespace: osrlib.Core
Assembly: osrlib.Core.dll
Syntax
public class Dungeon
Properties
| Improve this Doc View SourceActiveEncounter
Gets or sets the active Encounter.
Declaration
public Encounter ActiveEncounter { get; set; }
Property Value
Type | Description |
---|---|
Encounter |
CurrentPosition
Gets or sets the current GamePosition of the Party within the Dungeon. Default: 0,0
.
Declaration
public GamePosition CurrentPosition { get; set; }
Property Value
Type | Description |
---|---|
GamePosition |
DungeonId
Gets or sets the ID of the Dungeon.
Declaration
public string DungeonId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Encounters
Gets or sets the collection of Encounters within the Dungeon.
Declaration
public List<Encounter> Encounters { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<Encounter> |
Height
Gets or sets the height of the dungeon. Default: 15
.
Declaration
public int Height { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
NextDungeonId
Gets or sets the ID of the next Dungeon in the Adventure.
Declaration
public int NextDungeonId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PrevDungeonId
Gets or sets the ID of the previous Dungeon in the Adventure.
Declaration
public int PrevDungeonId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StartPosition
Gets or sets the starting position of the Party. Default: 0,0
.
Declaration
public GamePosition StartPosition { get; set; }
Property Value
Type | Description |
---|---|
GamePosition |
Width
Gets or sets the width of the Dungeon. Default: 15
.
Declaration
public int Width { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceMoveParty(Int32, Int32, Int32)
Moves the Party to the specified position within the Dungeon.
Declaration
public GamePosition MoveParty(int x, int y, int z = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | The position on the x axis. |
System.Int32 | y | The position on the y axis. |
System.Int32 | z | The position on the z axis. Default: |
Returns
Type | Description |
---|---|
GamePosition | The new GamePosition of the Party. |
Remarks
To determine whether the party moves to a position occupied by an encounter, subscribe to the Encountered event.
Events
| Improve this Doc View SourceEncountered
Event raised when the Party has moved to a GamePosition that is occupied by an Encounter.
Declaration
public event EventHandler Encountered
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
To obtain the Encounter, check the sender's ActiveEncounter property.