Blaze Brigade
Static Public Member Functions | List of all members
View.DrawClass Class Reference

Draw Class containing all the different draw methods More...

Static Public Member Functions

static void DrawUnit (SpriteBatch spriteBatch, Player player)
 
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)
 

Detailed Description

Draw Class containing all the different draw methods

Member Function Documentation

§ 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.

Parameters
spriteBatchto draw 2D bitmap to screen
fontsmall font to be used
largeFontLarger font to be used
largestFontLargest font to be used
graphThe 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.

Parameters
spriteBatchto draw 2D bitmap to screen
fontthe 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
spriteBatchto draw 2D bitmap to screen

§ drawEndTurnButton()

static void View.DrawClass.drawEndTurnButton ( SpriteBatch  spriteBatch,
Texture2D  endTurnButton 
)
static

Draw end turn button

Parameters
spriteBatchto draw 2D bitmap to screen
endTurnButtonEnd 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", and a darkened background is drawn to screen.

Parameters
spriteBatchto draw 2D bitmap to screen
gameOverThe game over button Texture2D
backgroundThe background Texture2D
largestFontLargest 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.

Parameters
spriteBatchto draw 2D bitmap to screen
graphThe current game graph
moveableNodeThe texture for moveableNode
attackableNodeThe 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
spriteBatchDraws 2D bitmap to screen.
unitUnit to print information of.
fontSmall font to be used.
largeFontLarger 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
spriteBatchto draw 2D bitmap to screen
fontThe font used to draw the text

§ 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
spriteBatchto draw 2D bitmap to screen
player1TransitionThe player 1 transition texture2D
player2TransitionThe 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. All the player's units will then be looped through, and drawn to screen if such unit is alive.

Parameters
spriteBatchto draw 2D bitmap to screen
playerThe 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
spriteBatchto draw 2D bitmap to screen

The documentation for this class was generated from the following file: