C# Class MyGame.Screen

This class represent Screen that draws text on Screen having 3 different sized fonts that can be used
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Show file Open project: mahmoudbahaa/XNA-Game-project

Protected Properties

Property Type Description
background Microsoft.Xna.Framework.Graphics.Texture2D
backgroundColor Color
bigFont Microsoft.Xna.Framework.Graphics.SpriteFont
delayedAction Helper.DelayedAction
mediumFont Microsoft.Xna.Framework.Graphics.SpriteFont
menuItemColor Color
myGame MyGame
silencePeriod float
smallFont Microsoft.Xna.Framework.Graphics.SpriteFont
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch

Public Methods

Method Description
Screen ( MyGame game, int delayedActionDelay ) : System
reInitialize ( ) : void

Protected Methods

Method Description
checkSilencePeriod ( GameTime gameTime ) : bool
findCenteredPos ( String text, SpriteFont font ) : Vector2

Method Details

Screen() public method

public Screen ( MyGame game, int delayedActionDelay ) : System
game MyGame
delayedActionDelay int
return System

checkSilencePeriod() protected method

protected checkSilencePeriod ( GameTime gameTime ) : bool
gameTime Microsoft.Xna.Framework.GameTime
return bool

findCenteredPos() protected method

protected findCenteredPos ( String text, SpriteFont font ) : Vector2
text String
font Microsoft.Xna.Framework.Graphics.SpriteFont
return Vector2

reInitialize() public method

public reInitialize ( ) : void
return void

Property Details

background protected property

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

backgroundColor protected property

protected Color backgroundColor
return Color

bigFont protected property

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

delayedAction protected property

protected DelayedAction,Helper delayedAction
return Helper.DelayedAction

mediumFont protected property

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

menuItemColor protected property

protected Color menuItemColor
return Color

myGame protected property

protected MyGame,MyGame myGame
return MyGame

silencePeriod protected property

protected float silencePeriod
return float

smallFont protected property

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

spriteBatch protected property

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