C# 클래스 Descent.GUI.Screens.BoardElement

The element on the screen that visualizes the game board and marking fields on the board if needed.
상속: GUIElement
파일 보기 프로젝트 열기: nezbo/Descent

공개 메소드들

메소드 설명
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