C# Class Ballz.Renderer.BaseRenderer

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Datei anzeigen Open project: SpagAachen/Ballz

Protected Properties

Property Type Description
CloudSpeed float
CloudTexture Microsoft.Xna.Framework.Graphics.Texture2D
ElapsedTime System.TimeSpan
Font Microsoft.Xna.Framework.Graphics.SpriteFont
Game Ballz
MipFont Microsoft.Xna.Framework.Graphics.SpriteFont[]
Quad Microsoft.Xna.Framework.Graphics.VertexPositionTexture[]
SkyColor Color
SkyTexture Microsoft.Xna.Framework.Graphics.Texture2D
SpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
WhiteTexture Microsoft.Xna.Framework.Graphics.Texture2D

Public Methods

Method Description
BaseRenderer ( Ballz game ) : System
Draw ( GameTime gameTime ) : void
DrawMessageOverlay ( MessageOverlay overlay ) : void
DrawMessageOverlay ( string header, string longtext = null, string footer = null ) : void
DrawSky ( ) : void
DrawText ( string _text, Vector2 position, float size, Color color, int shadowOffset = 2, bool centerVertical = false, bool centerHorizontal = false ) : void

Draws the text.

WorldToScreen ( Vector2 Position ) : Vector2
WorldToScreen ( Vector3 Position ) : Vector2

Protected Methods

Method Description
CheckLetters ( string toCheck ) : string
LoadContent ( ) : void
LoadFonts ( ) : void
LoadTextures ( ) : void

Method Details

BaseRenderer() public method

public BaseRenderer ( Ballz game ) : System
game Ballz
return System

CheckLetters() protected method

protected CheckLetters ( string toCheck ) : string
toCheck string
return string

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

DrawMessageOverlay() public method

public DrawMessageOverlay ( MessageOverlay overlay ) : void
overlay MessageOverlay
return void

DrawMessageOverlay() public method

public DrawMessageOverlay ( string header, string longtext = null, string footer = null ) : void
header string
longtext string
footer string
return void

DrawSky() public method

public DrawSky ( ) : void
return void

DrawText() public method

Draws the text.
public DrawText ( string _text, Vector2 position, float size, Color color, int shadowOffset = 2, bool centerVertical = false, bool centerHorizontal = false ) : void
_text string
position Vector2 Position.
size float Size as a multiple of 48pt.
color Color Color.
shadowOffset int Shadow offset.
centerVertical bool If set to true center vertical.
centerHorizontal bool If set to true center horizontal.
return void

LoadContent() protected method

protected LoadContent ( ) : void
return void

LoadFonts() protected method

protected LoadFonts ( ) : void
return void

LoadTextures() protected method

protected LoadTextures ( ) : void
return void

WorldToScreen() public method

public WorldToScreen ( Vector2 Position ) : Vector2
Position Vector2
return Vector2

WorldToScreen() public method

public WorldToScreen ( Vector3 Position ) : Vector2
Position Vector3
return Vector2

Property Details

CloudSpeed protected_oe property

protected float CloudSpeed
return float

CloudTexture protected_oe property

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

ElapsedTime protected_oe property

protected TimeSpan,System ElapsedTime
return System.TimeSpan

Font protected_oe property

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

Game protected_oe property

protected Ballz Game
return Ballz

MipFont protected_oe property

protected SpriteFont[],Microsoft.Xna.Framework.Graphics MipFont
return Microsoft.Xna.Framework.Graphics.SpriteFont[]

Quad protected_oe property

protected VertexPositionTexture[],Microsoft.Xna.Framework.Graphics Quad
return Microsoft.Xna.Framework.Graphics.VertexPositionTexture[]

SkyColor protected_oe property

protected Color SkyColor
return Color

SkyTexture protected_oe property

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

SpriteBatch protected_oe property

protected SpriteBatch,Microsoft.Xna.Framework.Graphics SpriteBatch
return Microsoft.Xna.Framework.Graphics.SpriteBatch

WhiteTexture protected_oe property

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