C# 클래스 PantheonPrototype.HUD

This is the wrapper class for all information that will go into the HUD. It will have HUDItems in it, thad can be added at will and drawn all at once.
파일 보기 프로젝트 열기: Bacon41/PantheonPrototype 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
HUDcoords Vector2
SCREEN_HEIGHT int
SCREEN_WIDTH int
background Microsoft.Xna.Framework.Graphics.Texture2D
backing Microsoft.Xna.Framework.Graphics.Texture2D
danger int
font Microsoft.Xna.Framework.Graphics.SpriteFont
graphicsDevice GraphicsDevice
hudItems List

공개 메소드들

메소드 설명
AddItem ( String img, int x, int y, Microsoft.Xna.Framework.Content.ContentManager content ) : void

This is the method to add more items to the HUD. Accepts a string that defines an image in the preloaded content, X and Y HUD coordinates, and a content manager.

AddItem ( String text, int x, int y, SpriteFont font ) : void

An overload funtion to just draw a string instead of an image. Accepts a string that defines an image in the preloaded content and X and Y HUD coordinates.

Draw ( SpriteBatch spriteBatch, SpriteFont font ) : void

The method to draw all of the different HUDItems.

HUD ( GraphicsDevice graphicsDevice, Microsoft.Xna.Framework.Content.ContentManager Content, int WIDTH, int HEIGHT, SpriteFont font ) : System
Update ( GameTime gameTime, Pantheon gameReference, Level level ) : void

The method to update all of the HUDItems' information.

메소드 상세

AddItem() 공개 메소드

This is the method to add more items to the HUD. Accepts a string that defines an image in the preloaded content, X and Y HUD coordinates, and a content manager.
public AddItem ( String img, int x, int y, Microsoft.Xna.Framework.Content.ContentManager content ) : void
img String
x int
y int
content Microsoft.Xna.Framework.Content.ContentManager
리턴 void

AddItem() 공개 메소드

An overload funtion to just draw a string instead of an image. Accepts a string that defines an image in the preloaded content and X and Y HUD coordinates.
public AddItem ( String text, int x, int y, SpriteFont font ) : void
text String
x int
y int
font Microsoft.Xna.Framework.Graphics.SpriteFont
리턴 void

Draw() 공개 메소드

The method to draw all of the different HUDItems.
public Draw ( SpriteBatch spriteBatch, SpriteFont font ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The object that we will use to draw to the screen.
font Microsoft.Xna.Framework.Graphics.SpriteFont
리턴 void

HUD() 공개 메소드

public HUD ( GraphicsDevice graphicsDevice, Microsoft.Xna.Framework.Content.ContentManager Content, int WIDTH, int HEIGHT, SpriteFont font ) : System
graphicsDevice GraphicsDevice
Content Microsoft.Xna.Framework.Content.ContentManager
WIDTH int
HEIGHT int
font Microsoft.Xna.Framework.Graphics.SpriteFont
리턴 System

Update() 공개 메소드

The method to update all of the HUDItems' information.
public Update ( GameTime gameTime, Pantheon gameReference, Level level ) : void
gameTime Microsoft.Xna.Framework.GameTime The object that holds all the time information.
gameReference Pantheon
level Level
리턴 void

프로퍼티 상세

HUDcoords 보호되어 있는 프로퍼티

protected Vector2 HUDcoords
리턴 Vector2

SCREEN_HEIGHT 보호되어 있는 프로퍼티

protected int SCREEN_HEIGHT
리턴 int

SCREEN_WIDTH 보호되어 있는 프로퍼티

protected int SCREEN_WIDTH
리턴 int

background 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics background
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

backing 보호되어 있는 프로퍼티

protected Texture2D,Microsoft.Xna.Framework.Graphics backing
리턴 Microsoft.Xna.Framework.Graphics.Texture2D

danger 보호되어 있는 프로퍼티

protected int danger
리턴 int

font 보호되어 있는 프로퍼티

protected SpriteFont,Microsoft.Xna.Framework.Graphics font
리턴 Microsoft.Xna.Framework.Graphics.SpriteFont

graphicsDevice 보호되어 있는 프로퍼티

protected GraphicsDevice graphicsDevice
리턴 GraphicsDevice

hudItems 보호되어 있는 프로퍼티

All of the different HUDItems that will need to be drawn. More or less can be registered.
protected List hudItems
리턴 List