C# Class DRObjects.MapBlock

Show file Open project: Haedrian/Divine-Right Class Usage Examples

Public Methods

Method Description
ConvertToGraphicalBlock ( ) : GraphicalBlock

Converts a particular block into a graphical block

ConvertToGraphicalBlock ( GlobalOverlay overlay ) : GraphicalBlock
ForcePutItemOnBlock ( MapItem item ) : void

Puts a local map item int he current block. Whether the tile lets it or not.

GetActions ( Actor actor ) : ActionType[]

Gets the actions which can be performed on this Block

GetItems ( ) : DRObjects.MapItem[]

Gets all items. This includes inactive ones - you might want to check that

GetTopItem ( ) : MapItem

Gets the top Item in the block. Could either be a tile, or it could be the top item

GetTopMapItem ( ) : MapItem

Gets the top mapitem in the stack, or null if there is no item. It will check if the map item is active or not before showing it.

MapBlock ( ) : System
PerformAction ( ActionType actionType, Actor actor, object args ) : ActionFeedback[]
PutItemOnBlock ( MapItem item ) : ActionFeedback[]

Adds a local map item in the current block.

PutItemUnderneathOnBlock ( MapItem item ) : void

Puts a local map item in the current block. Whether the tile lets it or not. Will put it in second place (underneath the top item)

RemoveAllItems ( ) : void

Removes all items from the MapBlock. THIS INCLUDES THE ONES WHICH ARE INACTIVE

RemoveItem ( MapItem item ) : void

Removes a particular item in the block

RemoveItemAt ( int index ) : void

Removes the Nth item in the block

RemoveTopItem ( ) : void

Removes the top item. If it is empty - do nothing

ToString ( ) : string

Method Details

ConvertToGraphicalBlock() public method

Converts a particular block into a graphical block
public ConvertToGraphicalBlock ( ) : GraphicalBlock
return DRObjects.GraphicsEngineObjects.GraphicalBlock

ConvertToGraphicalBlock() public method

public ConvertToGraphicalBlock ( GlobalOverlay overlay ) : GraphicalBlock
overlay GlobalOverlay
return DRObjects.GraphicsEngineObjects.GraphicalBlock

ForcePutItemOnBlock() public method

Puts a local map item int he current block. Whether the tile lets it or not.
public ForcePutItemOnBlock ( MapItem item ) : void
item MapItem
return void

GetActions() public method

Gets the actions which can be performed on this Block
public GetActions ( Actor actor ) : ActionType[]
actor Actor
return ActionType[]

GetItems() public method

Gets all items. This includes inactive ones - you might want to check that
public GetItems ( ) : DRObjects.MapItem[]
return DRObjects.MapItem[]

GetTopItem() public method

Gets the top Item in the block. Could either be a tile, or it could be the top item
public GetTopItem ( ) : MapItem
return MapItem

GetTopMapItem() public method

Gets the top mapitem in the stack, or null if there is no item. It will check if the map item is active or not before showing it.
public GetTopMapItem ( ) : MapItem
return MapItem

MapBlock() public method

public MapBlock ( ) : System
return System

PerformAction() public method

public PerformAction ( ActionType actionType, Actor actor, object args ) : ActionFeedback[]
actionType ActionType
actor Actor
args object
return ActionFeedback[]

PutItemOnBlock() public method

Adds a local map item in the current block.
public PutItemOnBlock ( MapItem item ) : ActionFeedback[]
item MapItem
return ActionFeedback[]

PutItemUnderneathOnBlock() public method

Puts a local map item in the current block. Whether the tile lets it or not. Will put it in second place (underneath the top item)
public PutItemUnderneathOnBlock ( MapItem item ) : void
item MapItem
return void

RemoveAllItems() public method

Removes all items from the MapBlock. THIS INCLUDES THE ONES WHICH ARE INACTIVE
public RemoveAllItems ( ) : void
return void

RemoveItem() public method

Removes a particular item in the block
public RemoveItem ( MapItem item ) : void
item MapItem
return void

RemoveItemAt() public method

Removes the Nth item in the block
public RemoveItemAt ( int index ) : void
index int
return void

RemoveTopItem() public method

Removes the top item. If it is empty - do nothing
public RemoveTopItem ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string