C# Класс Descent.GUI.Screens.BoardElement

The element on the screen that visualizes the game board and marking fields on the board if needed.
Наследование: GUIElement
Показать файл Открыть проект

Открытые методы

Метод Описание
BoardElement ( Microsoft.Xna.Framework.Game game, Board board, Role role ) : System

Creates a new BoardGUIElement for the given parameters.

ClearMarks ( ) : void

Clears the board for all markings.

Draw ( SpriteBatch draw ) : void
HandleClick ( int x, int y ) : bool
MarkSquare ( int x, int y, bool positive ) : void

Marks a square on the board with a transparent color.

Update ( GameTime gameTime ) : void

Приватные методы

Метод Описание
CalcBoardSquare ( int mouseX, int mouseY ) : Point
CalcScreenVector ( int boardX, int boardY ) : Vector2
DrawMark ( SpriteBatch draw, int boardX, int boardY, bool positiveMark ) : void
RightPosition ( Figure f, Point toTest ) : bool

Описание методов

BoardElement() публичный Метод

Creates a new BoardGUIElement for the given parameters.
public BoardElement ( Microsoft.Xna.Framework.Game game, Board board, Role role ) : System
game Microsoft.Xna.Framework.Game The current Game object.
board Descent.Model.Board.Board The Board to visualize.
role Role The Role determines how much of the Board is visible.
Результат System

ClearMarks() публичный Метод

Clears the board for all markings.
public ClearMarks ( ) : void
Результат void

Draw() публичный Метод

public Draw ( SpriteBatch draw ) : void
draw Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

HandleClick() публичный Метод

public HandleClick ( int x, int y ) : bool
x int
y int
Результат bool

MarkSquare() публичный Метод

Marks a square on the board with a transparent color.
public MarkSquare ( int x, int y, bool positive ) : void
x int The x-coordinate of the square on the board.
y int The y-coordinate of the square on the board.
positive bool True if the highlight should indicate a eligible. False if it should indicate inaccessibility.
Результат void

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void