프로퍼티 | 타입 | 설명 | |
---|---|---|---|
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 ( ) : |
Defines the space the minimap is using
|
|
DefineRectangle ( ) : |
Defines the space the HUD is using.
|
|
HUD ( |
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 ( |
Draws the HUD and the objects required.
|
|
LoadCommands ( ) : void |
public DefineMiniMapRectangle ( ) : |
||
리턴 |
public DefineRectangle ( ) : |
||
리턴 |
public HUD ( |
||
p | The player this HUD belongs to | |
c | Color | The desired color for this HUD |
리턴 | System |
public IncrementStartCommandXY ( float startX ) : void | ||
startX | float | |
리턴 | void |
public IncrementStartObjectXY ( float startX ) : void | ||
startX | float | |
리턴 | void |
public MouseClickListener ( MouseEvent me ) : void | ||
me | MouseEvent | The MouseEvent to use |
리턴 | void |
public Update ( KeyboardState ks, MouseState ms ) : void | ||
ks | KeyboardState | Default KeyboardState |
ms | MouseState | Default MouseState |
리턴 | void |