C# Class PantheonPrototype.HUDItem

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

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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 méthode

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

HUDItem() public méthode

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
Résultat System

HUDItem() public méthode

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

SetOpacity() public méthode

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
Résultat void

Update() public méthode

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

Property Details

coordinates protected_oe property

protected Rectangle,Microsoft.Xna.Framework coordinates
Résultat Microsoft.Xna.Framework.Rectangle

defaultWidth protected_oe property

protected int defaultWidth
Résultat int

font protected_oe property

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont

image protected_oe property

protected Texture2D,Microsoft.Xna.Framework.Graphics image
Résultat Microsoft.Xna.Framework.Graphics.Texture2D

isImage protected_oe property

protected Boolean,System isImage
Résultat System.Boolean

opacity protected_oe property

protected Color opacity
Résultat Color

rightJustifiedXCoord protected_oe property

protected int rightJustifiedXCoord
Résultat int

textImage protected_oe property

protected String textImage
Résultat String