C# 클래스 Descent.Model.Board.Board

A board of
파일 보기 프로젝트 열기: nezbo/Descent 1 사용 예제들

공개 메소드들

메소드 설명
AddDoor ( Door door ) : void

Adds a door to the board

Board ( int width, int height, Microsoft.Xna.Framework.Graphics.Texture2D floorTexture ) : System

Initializes a new instance of the Board class.

CanFigureMoveToPoint ( Figure figure, Point point ) : bool

Gets a value indicating whether a figure can move to a point

CanOverlordSpawn ( Point point ) : bool

Indicates whether the overlord can spawn on a space

Distance ( Point here, Point there ) : int

Get the distance between to squares. This distance does not take blocking into account, such has there being a wall in the way

FigureSquares ( Figure figure ) : Point[]

Creates an array of all points a figure is on

IsSquareWithinBoard ( Point point ) : bool

Determines whether the point is within the board, and if there is a square on that point.

IsSquareWithinBoard ( int x, int y ) : bool

Determines wether the point (x, y) is within the board, and a square in the dungeon

IsStandable ( Point points ) : bool

Is all points in the array standable?

IsStandable ( int x, int y ) : bool

Is the square inside the dungeon, and is there no figure?

IsThereLineOfSight ( Figure from, Figure to, bool ignoreMonsters ) : bool

Indicates whethere there's nothing in the way from one figure to another. Can ignore monsters.

IsThereLineOfSight ( Point from, Point to, bool ignoreMonsters ) : bool

Indicates whether there is nothing in the way from one point to another Monsters can be ignored, so it can be used to calculate where to spawn monsters

IsValidStartSquare ( Point point ) : bool

Indicates whether a point is a valid start/spawn point

MoveFigure ( Figure figure, Point point ) : void

Moves a figure to a specific point.

OpenDoor ( Point point ) : void

Open a door

PlaceFigure ( Figure figure, Point point ) : void

Places a figure at a specific point

RespawnDeadHeroes ( ) : void

Respawns a dead hero next to the start glyph

SquareVisibleByPlayers ( int x, int y ) : bool

Should the square be shown on the board? A square is visible by players if it has something on it, and if that squares area has been revealed

this ( Point p ) : Square

Access a point on the board

this ( int x, int y ) : Square

Access the (x, y)'th in the board

비공개 메소드들

메소드 설명
CanOpenDoor ( Point point ) : bool
GetDoor ( Point point ) : Door

Gets a door at a specific point, if there is any

PlaceDeadHero ( Hero hero ) : void
RemoveFigure ( Point point ) : void

Removes a figure from all squares where it was previously on the board

SquaresBetweenPoints ( Point from, Point to ) : Point[]

Get a (non-sorted) array of squares between two squares.

UpdateCanSpawn ( ) : void

메소드 상세

AddDoor() 공개 메소드

Adds a door to the board
public AddDoor ( Door door ) : void
door Door /// The door to be added ///
리턴 void

Board() 공개 메소드

Initializes a new instance of the Board class.
public Board ( int width, int height, Microsoft.Xna.Framework.Graphics.Texture2D floorTexture ) : System
width int /// The width of the board ///
height int /// The height of the board ///
floorTexture Microsoft.Xna.Framework.Graphics.Texture2D /// The floor Texture. ///
리턴 System

CanFigureMoveToPoint() 공개 메소드

Gets a value indicating whether a figure can move to a point
public CanFigureMoveToPoint ( Figure figure, Point point ) : bool
figure Descent.Model.Player.Figure.Figure /// The figure ///
point Point /// The upper left corner of the end point ///
리턴 bool

CanOverlordSpawn() 공개 메소드

Indicates whether the overlord can spawn on a space
public CanOverlordSpawn ( Point point ) : bool
point Point /// The point ///
리턴 bool

Distance() 공개 메소드

Get the distance between to squares. This distance does not take blocking into account, such has there being a wall in the way
public Distance ( Point here, Point there ) : int
here Point /// The 'here' point ///
there Point /// The 'there' point ///
리턴 int

FigureSquares() 공개 메소드

Creates an array of all points a figure is on
public FigureSquares ( Figure figure ) : Point[]
figure Descent.Model.Player.Figure.Figure /// The figure ///
리턴 Point[]

IsSquareWithinBoard() 공개 메소드

Determines whether the point is within the board, and if there is a square on that point.
public IsSquareWithinBoard ( Point point ) : bool
point Point /// The point. ///
리턴 bool

IsSquareWithinBoard() 공개 메소드

Determines wether the point (x, y) is within the board, and a square in the dungeon
public IsSquareWithinBoard ( int x, int y ) : bool
x int /// The x coordinate ///
y int /// The y coordinate ///
리턴 bool

IsStandable() 공개 메소드

Is all points in the array standable?
public IsStandable ( Point points ) : bool
points Point
리턴 bool

IsStandable() 공개 메소드

Is the square inside the dungeon, and is there no figure?
public IsStandable ( int x, int y ) : bool
x int /// The x coordinate ///
y int /// The y coordinate ///
리턴 bool

IsThereLineOfSight() 공개 메소드

Indicates whethere there's nothing in the way from one figure to another. Can ignore monsters.
public IsThereLineOfSight ( Figure from, Figure to, bool ignoreMonsters ) : bool
from Descent.Model.Player.Figure.Figure "From" figure.
to Descent.Model.Player.Figure.Figure "To" figure.
ignoreMonsters bool Will ignore monsters if true.
리턴 bool

IsThereLineOfSight() 공개 메소드

Indicates whether there is nothing in the way from one point to another Monsters can be ignored, so it can be used to calculate where to spawn monsters
public IsThereLineOfSight ( Point from, Point to, bool ignoreMonsters ) : bool
from Point /// The start point ///
to Point /// The end point ///
ignoreMonsters bool /// If true, monsters will be ignored so they do not break line of sight ///
리턴 bool

IsValidStartSquare() 공개 메소드

Indicates whether a point is a valid start/spawn point
public IsValidStartSquare ( Point point ) : bool
point Point /// The point to check ///
리턴 bool

MoveFigure() 공개 메소드

Moves a figure to a specific point.
public MoveFigure ( Figure figure, Point point ) : void
figure Descent.Model.Player.Figure.Figure /// The figure that is moved ///
point Point /// The upper left corner of the figure, that is moved to ///
리턴 void

OpenDoor() 공개 메소드

Open a door
public OpenDoor ( Point point ) : void
point Point /// A point adjacent to a door ///
리턴 void

PlaceFigure() 공개 메소드

Places a figure at a specific point
public PlaceFigure ( Figure figure, Point point ) : void
figure Descent.Model.Player.Figure.Figure /// The figure that is placed ///
point Point /// The upper left corner of the figure ///
리턴 void

RespawnDeadHeroes() 공개 메소드

Respawns a dead hero next to the start glyph
public RespawnDeadHeroes ( ) : void
리턴 void

SquareVisibleByPlayers() 공개 메소드

Should the square be shown on the board? A square is visible by players if it has something on it, and if that squares area has been revealed
public SquareVisibleByPlayers ( int x, int y ) : bool
x int /// The x coordinate ///
y int /// The y coordinate ///
리턴 bool

this() 공개 메소드

Access a point on the board
public this ( Point p ) : Square
p Point /// The point to be accessed ///
리턴 Square

this() 공개 메소드

Access the (x, y)'th in the board
public this ( int x, int y ) : Square
x int /// The x coordinate ///
y int /// The y coordinate ///
리턴 Square