C# 클래스 PantheonPrototype.HUDItem

This is the class that will contain all of the information for drawing and maintaining a component of the HUD.
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype

보호된 프로퍼티들

프로퍼티 타입 설명
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