C# Class DivineRightGame.LocalMap

Show file Open project: Haedrian/Divine-Right

Public Properties

Property Type Description
localGameMap DRObjects.MapBlock[

Public Methods

Method Description
AddToLocalMap ( MapBlock block ) : void

Add a block to a local map

DeserialiseLocalMap ( System.Guid uniqueGuid ) : LocalMap

Loads a local map from the file it was saved in. Will not load it into the gamestate thoughs

GeneratePathfindingMap ( ) : void

Generates the map required for pathfinding, and assign it to the Interface

GetBlockAtCoordinate ( MapCoordinate coordinate ) : MapBlock

Gets a block which is at a particular coordinate. If there is no block marked on the map, it will return an Air block.

GetBlocksAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]
HasDirectPath ( MapCoordinate source, MapCoordinate target ) : bool

Returns true if there is a direct path between the source and the target

LocalMap ( int sizeX, int sizeY, int sizeZ, int groundLevel ) : System

Creates a new Local map with x,y,z as size. The ground level determines the entry level for the map (generally 0)

MapGenerated ( System.Guid uniqueGuid ) : bool

Determines whether a map has been generated already or not

MinuteChanged ( object sender, EventArgs e ) : void

Performs the summoning of creatures for Dungeons, as well as handles events

SerialiseLocalMap ( ) : void

Saves the Local Map into the folder as per its guid

Tick ( ) : ActionFeedback[]

Perform a tick. Checks all actors and allow them an action

Method Details

AddToLocalMap() public method

Add a block to a local map
public AddToLocalMap ( MapBlock block ) : void
block DRObjects.MapBlock
return void

DeserialiseLocalMap() public static method

Loads a local map from the file it was saved in. Will not load it into the gamestate thoughs
public static DeserialiseLocalMap ( System.Guid uniqueGuid ) : LocalMap
uniqueGuid System.Guid
return LocalMap

GeneratePathfindingMap() public method

Generates the map required for pathfinding, and assign it to the Interface
public GeneratePathfindingMap ( ) : void
return void

GetBlockAtCoordinate() public method

Gets a block which is at a particular coordinate. If there is no block marked on the map, it will return an Air block.
public GetBlockAtCoordinate ( MapCoordinate coordinate ) : MapBlock
coordinate MapCoordinate
return DRObjects.MapBlock

GetBlocksAroundPoint() public method

public GetBlocksAroundPoint ( MapCoordinate centre, int radius ) : DRObjects.MapBlock[]
centre MapCoordinate
radius int
return DRObjects.MapBlock[]

HasDirectPath() public method

Returns true if there is a direct path between the source and the target
public HasDirectPath ( MapCoordinate source, MapCoordinate target ) : bool
source MapCoordinate
target MapCoordinate
return bool

LocalMap() public method

Creates a new Local map with x,y,z as size. The ground level determines the entry level for the map (generally 0)
public LocalMap ( int sizeX, int sizeY, int sizeZ, int groundLevel ) : System
sizeX int
sizeY int
sizeZ int
groundLevel int
return System

MapGenerated() public static method

Determines whether a map has been generated already or not
public static MapGenerated ( System.Guid uniqueGuid ) : bool
uniqueGuid System.Guid
return bool

MinuteChanged() public method

Performs the summoning of creatures for Dungeons, as well as handles events
public MinuteChanged ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

SerialiseLocalMap() public method

Saves the Local Map into the folder as per its guid
public SerialiseLocalMap ( ) : void
return void

Tick() public method

Perform a tick. Checks all actors and allow them an action
public Tick ( ) : ActionFeedback[]
return ActionFeedback[]

Property Details

localGameMap public property

public MapBlock[,DRObjects localGameMap
return DRObjects.MapBlock[