Свойство | Тип | Описание | |
---|---|---|---|
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 |