C# 클래스 PathfindingTest.UI.HUD

상속: MouseClickListener
파일 보기 프로젝트 열기: Wotuu/RTS_XNA_v2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
color Color
hudTex Texture2D
miniMapTex Texture2D
player Player
sf SpriteFont

공개 메소드들

메소드 설명
CountUnits ( ) : void

Count the different unit/building types selected. Checks what objects to load in the HUD.

DefineMiniMapRectangle ( ) : Rectangle

Defines the space the minimap is using

DefineRectangle ( ) : Rectangle

Defines the space the HUD is using.

HUD ( Player p, Color c ) : System

Sets the textures to use for the HUD. Creates new instances of needed components. Sets variables to their default values.

IncrementStartCommandXY ( float startX ) : void
IncrementStartObjectXY ( float startX ) : void
IsMouseOverBuilding ( ) : Boolean

Checks whether the mouse is hovering over an object on the HUD.

MouseClickListener ( MouseEvent me ) : void

Used for creating units and buildings respectively.

Update ( KeyboardState ks, MouseState ms ) : void

Checks whether the HUD should be hidden or not. (if the player this HUD belongs to is not the player that is watching) Loads the objects to display according to selected units/buildings.

비공개 메소드들

메소드 설명
Draw ( SpriteBatch sb ) : void

Draws the HUD and the objects required.

LoadCommands ( ) : void

메소드 상세

CountUnits() 공개 메소드

Count the different unit/building types selected. Checks what objects to load in the HUD.
public CountUnits ( ) : void
리턴 void

DefineMiniMapRectangle() 공개 메소드

Defines the space the minimap is using
public DefineMiniMapRectangle ( ) : Rectangle
리턴 Microsoft.Xna.Framework.Rectangle

DefineRectangle() 공개 메소드

Defines the space the HUD is using.
public DefineRectangle ( ) : Rectangle
리턴 Microsoft.Xna.Framework.Rectangle

HUD() 공개 메소드

Sets the textures to use for the HUD. Creates new instances of needed components. Sets variables to their default values.
public HUD ( Player p, Color c ) : System
p PathfindingTest.Players.Player The player this HUD belongs to
c Color The desired color for this HUD
리턴 System

IncrementStartCommandXY() 공개 메소드

public IncrementStartCommandXY ( float startX ) : void
startX float
리턴 void

IncrementStartObjectXY() 공개 메소드

public IncrementStartObjectXY ( float startX ) : void
startX float
리턴 void

IsMouseOverBuilding() 공개 메소드

Checks whether the mouse is hovering over an object on the HUD.
public IsMouseOverBuilding ( ) : Boolean
리턴 Boolean

MouseClickListener() 공개 메소드

Used for creating units and buildings respectively.
public MouseClickListener ( MouseEvent me ) : void
me MouseEvent The MouseEvent to use
리턴 void

Update() 공개 메소드

Checks whether the HUD should be hidden or not. (if the player this HUD belongs to is not the player that is watching) Loads the objects to display according to selected units/buildings.
public Update ( KeyboardState ks, MouseState ms ) : void
ks KeyboardState Default KeyboardState
ms MouseState Default MouseState
리턴 void

프로퍼티 상세

color 공개적으로 프로퍼티

public Color color
리턴 Color

hudTex 공개적으로 프로퍼티

public Texture2D hudTex
리턴 Texture2D

miniMapTex 공개적으로 프로퍼티

public Texture2D miniMapTex
리턴 Texture2D

player 공개적으로 프로퍼티

public Player player
리턴 Player

sf 공개적으로 프로퍼티

public SpriteFont sf
리턴 SpriteFont