C# Класс PantheonPrototype.HUDItem

This is the class that will contain all of the information for drawing and maintaining a component of the HUD.
Показать файл Открыть проект

Защищенные свойства (Protected)

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

Открытые методы

Метод Описание
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.

Описание методов

Draw() публичный Метод

The method to draw the component.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch A shared SpriteBatch for the HUD.
Результат void

HUDItem() публичный Метод

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
Результат System

HUDItem() публичный Метод

public HUDItem ( SpriteFont font, String text, int x, int y ) : System
font Microsoft.Xna.Framework.Graphics.SpriteFont
text String
x int
y int
Результат System

SetOpacity() публичный Метод

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
Результат void

Update() публичный Метод

The method to update the component.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Contains the time since [wheneverYouWant].
Результат void

Описание свойств

coordinates защищенное свойство

protected Rectangle,Microsoft.Xna.Framework coordinates
Результат Microsoft.Xna.Framework.Rectangle

defaultWidth защищенное свойство

protected int defaultWidth
Результат int

font защищенное свойство

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
Результат Microsoft.Xna.Framework.Graphics.SpriteFont

image защищенное свойство

protected Texture2D,Microsoft.Xna.Framework.Graphics image
Результат Microsoft.Xna.Framework.Graphics.Texture2D

isImage защищенное свойство

protected Boolean,System isImage
Результат System.Boolean

opacity защищенное свойство

protected Color opacity
Результат Color

rightJustifiedXCoord защищенное свойство

protected int rightJustifiedXCoord
Результат int

textImage защищенное свойство

protected String textImage
Результат String