Draw Class containing all the different draw methods
More...
|
static void | DrawUnit (SpriteBatch spriteBatch, Player player) |
|
static void | DrawPlayerTurn (SpriteBatch spriteBatch, int player, Texture2D playerTurn) |
|
static void | drawDamagePopup (SpriteBatch spriteBatch, SpriteFont font) |
|
static void | drawHighlightNodes (SpriteBatch spriteBatch, Graph graph, Texture2D moveableNode, Texture2D attackableNode) |
|
static void | drawDropDownMenu (SpriteBatch spriteBatch) |
|
static void | drawInventoryMenu (SpriteBatch spriteBatch, SpriteFont font) |
|
static void | drawUnitsAtGameOver (SpriteBatch spriteBatch) |
|
static void | drawEndTurnButton (SpriteBatch spriteBatch, Texture2D endTurnButton) |
|
static void | drawAttackConfirm (SpriteBatch spriteBatch, SpriteFont font, SpriteFont largeFont, SpriteFont largestFont, Graph graph) |
|
static void | drawInfoScreen (SpriteBatch spriteBatch, Unit unit, SpriteFont font, SpriteFont largeFont) |
|
static void | drawGameOverMenu (SpriteBatch spriteBatch, Texture2D gameOver, Texture2D backGround, SpriteFont largestFont) |
|
static void | drawTurnTransition (SpriteBatch spriteBatch, Texture2D player1Transition, Texture2D player2Transition) |
|
Draw Class containing all the different draw methods
§ drawAttackConfirm()
static void View.DrawClass.drawAttackConfirm |
( |
SpriteBatch |
spriteBatch, |
|
|
SpriteFont |
font, |
|
|
SpriteFont |
largeFont, |
|
|
SpriteFont |
largestFont, |
|
|
Graph |
graph |
|
) |
| |
|
static |
Draw attack confirmation screen. All the damage calculations, 1 set each for each player: AttackType, damageDealt, hitCOunt, hitRate, critRate, HP and equipped weapons are all printed to the screen. To make sure the damage numbers are properly displayed for which player's unit is attacking, and which is defending, the method will check for whose player's turn it currently is. The method will also draw the attack confirm button. Negative numbers for stats are handled in DamageClass.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
font | small font to be used |
largeFont | Larger font to be used |
largestFont | Largest font to be used |
graph | The game graph |
§ drawDamagePopup()
static void View.DrawClass.drawDamagePopup |
( |
SpriteBatch |
spriteBatch, |
|
|
SpriteFont |
font |
|
) |
| |
|
static |
Draw Damage pop up numbers from attacking. If GameState currentPlayerDamagePopup is true, draw the damage dealt by attacking player on top of the enemy unit. If GameState enemyPlayerDamagePopup is true, draw the damage received by defender on top of the recipient.
Exceptions:
- This function assumes that the last time damage calculation was calculated and stored corresponds to the last attacking and defending unit
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
font | the font to be used |
§ drawDropDownMenu()
static void View.DrawClass.drawDropDownMenu |
( |
SpriteBatch |
spriteBatch | ) |
|
|
static |
Draws all active buttons for the currently selected unit. The 4 possible active button is Attack, Move, Item and Wait.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
§ drawEndTurnButton()
static void View.DrawClass.drawEndTurnButton |
( |
SpriteBatch |
spriteBatch, |
|
|
Texture2D |
endTurnButton |
|
) |
| |
|
static |
Draw end turn button
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
endTurnButton | End turn button texture2D |
§ drawGameOverMenu()
static void View.DrawClass.drawGameOverMenu |
( |
SpriteBatch |
spriteBatch, |
|
|
Texture2D |
gameOver, |
|
|
Texture2D |
backGround, |
|
|
SpriteFont |
largestFont |
|
) |
| |
|
static |
Draw Game over menu. A game over button texture, the string "Game Over", which player won, and a darkened background is drawn to screen.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
gameOver | The game over button Texture2D |
background | The background Texture2D |
largestFont | Largest font to be used |
§ drawHighlightNodes()
static void View.DrawClass.drawHighlightNodes |
( |
SpriteBatch |
spriteBatch, |
|
|
Graph |
graph, |
|
|
Texture2D |
moveableNode, |
|
|
Texture2D |
attackableNode |
|
) |
| |
|
static |
Draw highlightable nodes. If a unit has yet to move, and unit is selected, all moveable nodes are highlighted blue, with the max attack range nodes highlighted red. Otherwise if a unit is selected, and has finished moving, only display the attackable nodes from the unit's current position.
Exceptions:
- If a unit has no moveable nodes, no squares will be highlighted blue
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
graph | The current game graph |
moveableNode | The texture for moveableNode |
attackableNode | The texture for attackableNode |
§ drawInfoScreen()
static void View.DrawClass.drawInfoScreen |
( |
SpriteBatch |
spriteBatch, |
|
|
Unit |
unit, |
|
|
SpriteFont |
font, |
|
|
SpriteFont |
largeFont |
|
) |
| |
|
static |
Draws character information popup. If it is player 1's turn, the popup will be on the bottom left screen. Otherwise it will show up on right side of the screen. The stats Level, Strength, Int, Skill, Speed, Defense, Resistance, HP and charInfoBackground texture are all drawn to screen.
- Parameters
-
spriteBatch | Draws 2D bitmap to screen. |
unit | Unit to print information of. |
font | Small font to be used. |
largeFont | Larger font to be used. |
§ drawInventoryMenu()
static void View.DrawClass.drawInventoryMenu |
( |
SpriteBatch |
spriteBatch, |
|
|
SpriteFont |
font |
|
) |
| |
|
static |
Draw Inventory Menu for the selected unit. This method will loop through all possible inventory slots, and display them if the slot if the button for that slot is both active, and has an item. The name of the item is drawn to screen along with the button.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
font | The font used to draw the text |
§ DrawPlayerTurn()
static void View.DrawClass.DrawPlayerTurn |
( |
SpriteBatch |
spriteBatch, |
|
|
int |
player, |
|
|
Texture2D |
playerTurn |
|
) |
| |
|
static |
Draw who's player turn it currently is. The method takes in the texture containing that info, spriteBatch and the int for the player's whose turn it is. The method will print the texture for player 1 on left side of screen if it is currently player 1's turn, otherwise it will print it on right side.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
player | The current player |
turnInfo | the Texture2D containing the text on which player's turn it currently is. |
§ drawTurnTransition()
static void View.DrawClass.drawTurnTransition |
( |
SpriteBatch |
spriteBatch, |
|
|
Texture2D |
player1Transition, |
|
|
Texture2D |
player2Transition |
|
) |
| |
|
static |
Draws a turn transition image to screen. player1Transition is if GameState is player1, otherwise player2Transition is drawn.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
player1Transition | The player 1 transition texture2D |
player2Transition | The player 2 transition texture2D |
§ DrawUnit()
static void View.DrawClass.DrawUnit |
( |
SpriteBatch |
spriteBatch, |
|
|
Player |
player |
|
) |
| |
|
static |
Draw unit sprites, by taking in spriteBatch, and the Player who's units are to be drawn along with their healthbar. All the player's units will then be looped through, and drawn to screen if such unit is alive. The healthbar location is directly above the character x coord of unit +1. The healthbar will be 30 pixels wide, and be scaled in accordance with the unit's current HP by using a rectangle.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
player | The player's unit to draw |
§ drawUnitsAtGameOver()
static void View.DrawClass.drawUnitsAtGameOver |
( |
SpriteBatch |
spriteBatch | ) |
|
|
static |
Redraw unit for game over. This method loops through all of player 1 and 2's units, and redraws them with a darker shade to match the darker game over screen.
- Parameters
-
spriteBatch | to draw 2D bitmap to screen |
The documentation for this class was generated from the following file:
- C:/Users/Thien Trandinh/Documents/Blaze-Brigade/src/Blaze-Brigade/Blaze_Brigade/DrawClass.cs