C# Class PantheonPrototype.HUDItem

This is the class that will contain all of the information for drawing and maintaining a component of the HUD.
Mostrar archivo Open project: Bacon41/PantheonPrototype

Protected Properties

Property Type Description
coordinates Microsoft.Xna.Framework.Rectangle
defaultWidth int
font Microsoft.Xna.Framework.Graphics.SpriteFont
image Microsoft.Xna.Framework.Graphics.Texture2D
isImage System.Boolean
opacity Color
rightJustifiedXCoord int
textImage String

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void

The method to draw the component.

HUDItem ( Microsoft.Xna.Framework.Content.ContentManager Content, String img, int x, int y ) : System
HUDItem ( SpriteFont font, String text, int x, int y ) : System
SetOpacity ( int n ) : void

Sets the opacity using an integer so you don't have to create a whole new Color(). Takes an integer from 0 to 255

Update ( GameTime gameTime ) : void

The method to update the component.

Method Details

Draw() public method

The method to draw the component.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A shared SpriteBatch for the HUD.
return void

HUDItem() public method

public HUDItem ( Microsoft.Xna.Framework.Content.ContentManager Content, String img, int x, int y ) : System
Content Microsoft.Xna.Framework.Content.ContentManager
img String
x int
y int
return System

HUDItem() public method

public HUDItem ( SpriteFont font, String text, int x, int y ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
text String
x int
y int
return System

SetOpacity() public method

Sets the opacity using an integer so you don't have to create a whole new Color(). Takes an integer from 0 to 255
public SetOpacity ( int n ) : void
n int
return void

Update() public method

The method to update the component.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Contains the time since [wheneverYouWant].
return void

Property Details

coordinates protected_oe property

protected Rectangle,Microsoft.Xna.Framework coordinates
return Microsoft.Xna.Framework.Rectangle

defaultWidth protected_oe property

protected int defaultWidth
return int

font protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
return Microsoft.Xna.Framework.Graphics.SpriteFont

image protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics image
return Microsoft.Xna.Framework.Graphics.Texture2D

isImage protected_oe property

protected Boolean,System isImage
return System.Boolean

opacity protected_oe property

protected Color opacity
return Color

rightJustifiedXCoord protected_oe property

protected int rightJustifiedXCoord
return int

textImage protected_oe property

protected String textImage
return String