TwigGame class members
Instance members
Properties
- BasicEffect
Although TwigObjects are free to use whatever Effects they like for
rendering, the TwigGame keeps two instances of BasicEffect around for shared
use, one for TwigObjects, and one for HUDs. The BasicEffect property
returns the effect intended for use with TwigObjects.
- CameraFOV
The current camera's field of view.
- CameraPosition
The current camera's position.
- CameraTargetLocation
The current camera's lookat position.
- CameraUp
The current camera's up direction.
- DebugObject
The TwigObject currently designated as the "debug object". This is
used by HUDs to decide whose debugging information to display.
- Device
The GraphicsDevice for this game.
- DialogFont
Font in which to display dialog.
- FillLevel
Determines the amount of ambient light for default lighting calculations.
- HUDEffect
A BasicEffect object pre-configured for drawing HUDs.
- HUDFont
The font to use for drawing HUDs
- HUDSprites
A shared SpriteBatch available for use by HUDs.
- KeyModifiers
Modifier keys currently held down.
- LoadContent()
Performs initial loading of content assets.
- NamedObjects
Dictionary of all named objects, including TwigObjects, that the script
interpreter can recognize.
- Pause
Prevents objects from updating when true.
- ProjectionMatrix
Projection matrix of current camera.
- SingleStep
Set to true to unpause the game for one frame.
- ViewMatrix
View matrix of the current camera.
Methods
- BindKey(KeyModifiers m, Keys k, string documentation, KeyHandler
handler)
BindKey(Keys k, string documentation, KeyHandler handler)
Arranges for handler to be called (once) each time key k is pressed with the
specified modifiers, if any.
- DocumentKey(Keys k, string documentation)
Specifies documentation on key to be displayed in the HelpHUD. Used
when a key is being processed directly by a TwigObject or other game
component, rather than through the BindKey mechanism.
- Draw(GameTime t)
Called to redraw the display.
- DrawDebugLine(Vector3 start, Vector3 end, Color c)
Draws a line. Has not effect in non-debug builds.
- DrawDebugMarker(Node n, Color c)
DrawDebugMarker(Vector3 position, Color c)
Draws a sphere of the specified color to mark the specified point. Has
not effect in non-debug builds.
- InitializeTwigObjects()
Called by constructor when it's safe to start creating the initial set of
TwigObjects for the game.
- InstallStandardDebuggingComponents()
Creates standard HUDs such as the help HUD and the chart recorder.
- IsKeyDown(Keys k)
Returns true if the key is currently being held down.
- Update(GameTime t)
Performs update of game and all objects for the current tick.