NewGamePhysics.GraphicalElements.GraphicalElementBase Class Reference

Base class for a graphical element in a screen managed by the screen manager. More...

Inheritance diagram for NewGamePhysics.GraphicalElements.GraphicalElementBase:
NewGamePhysics.GraphicalElements.BloomOverlay NewGamePhysics.GraphicalElements.DoubleRegularPendulum NewGamePhysics.GraphicalElements.DoubleSquarePendulum NewGamePhysics.GraphicalElements.EnergyIndicator NewGamePhysics.GraphicalElements.InfoMessages NewGamePhysics.GraphicalElements.LaplaceOverlay NewGamePhysics.GraphicalElements.ShootingGallery NewGamePhysics.GraphicalElements.ShootingGalleryTarget NewGamePhysics.GraphicalElements.ValueIndicator

List of all members.

Public Member Functions

 GraphicalElementBase (ScreenManager manager)
 Initializes a graphical element for a screen managed by a screen manager.

Properties

ScreenManager ScreenManager [get]
 Gets the screen manager associated with the graphical element.
SpriteBatch SpriteBatch [get]
 Gets the sprite batch associated with the manager.
PrimitiveBatch PrimitiveBatch [get]
 Gets the primitive batch associated with the screen.
Viewport Viewport [get]
 Gets the viewport associated with the screen.

Detailed Description

Base class for a graphical element in a screen managed by the screen manager.

Definition at line 16 of file GraphicalElementBase.cs.


Constructor & Destructor Documentation

NewGamePhysics.GraphicalElements.GraphicalElementBase.GraphicalElementBase ( ScreenManager  manager  ) 

Initializes a graphical element for a screen managed by a screen manager.

Parameters:
manager The screen manager to use for this element.

Definition at line 43 of file GraphicalElementBase.cs.

00044         {
00045             if (null == manager)
00046             {
00047                 throw new ArgumentNullException(
00048                     "manager",
00049                     "Screen manager object cannot be null");
00050             }
00051 
00052             // Set manager and get drawing helpers
00053             this.screenManager = manager;
00054             this.primitiveBatch = this.screenManager.PrimitiveBatch;
00055             this.spriteBatch = this.screenManager.SpriteBatch;
00056             this.viewport = this.screenManager.GraphicsDevice.Viewport;
00057         }


Property Documentation

PrimitiveBatch NewGamePhysics.GraphicalElements.GraphicalElementBase.PrimitiveBatch [get]

Gets the primitive batch associated with the screen.

Definition at line 79 of file GraphicalElementBase.cs.

ScreenManager NewGamePhysics.GraphicalElements.GraphicalElementBase.ScreenManager [get]

Gets the screen manager associated with the graphical element.

Definition at line 63 of file GraphicalElementBase.cs.

SpriteBatch NewGamePhysics.GraphicalElements.GraphicalElementBase.SpriteBatch [get]

Gets the sprite batch associated with the manager.

Definition at line 71 of file GraphicalElementBase.cs.

Viewport NewGamePhysics.GraphicalElements.GraphicalElementBase.Viewport [get]

Gets the viewport associated with the screen.

Definition at line 87 of file GraphicalElementBase.cs.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2