Base class for a graphical element in a screen managed by the screen manager. More...
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. | |
Base class for a graphical element in a screen managed by the screen manager.
Definition at line 16 of file GraphicalElementBase.cs.
| NewGamePhysics.GraphicalElements.GraphicalElementBase.GraphicalElementBase | ( | ScreenManager | manager | ) |
Initializes a graphical element for a screen managed by a screen manager.
| 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 }
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.
1.6.2