![]() |
Paradox Game Engine
v1.0.0 beta06
|
The game. More...
Public Member Functions | |
void | Exit () |
Exits the game. More... | |
void | ResetElapsedTime () |
Resets the elapsed time counter. More... | |
void | Run (GameContext gameContext=null) |
Call this method to initialize the game, begin running the game loop, and start processing events for the game. More... | |
void | SuppressDraw () |
Prevents calls to Draw until the next Update. More... | |
void | Tick () |
Updates the game's clock and calls Update and Draw. More... | |
![]() | |
void | Dispose () |
override string | ToString () |
Protected Member Functions | |
GameBase () | |
Initializes a new instance of the GameBase class. More... | |
virtual bool | BeginDraw () |
Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw. More... | |
virtual void | BeginRun () |
Called after all components are initialized but before the first update in the game loop. More... | |
override void | Destroy () |
Disposes of object resources. More... | |
virtual void | Draw (GameTime gameTime) |
Reference page contains code sample. More... | |
virtual void | EndDraw (bool present) |
Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw. More... | |
virtual void | EndRun () |
Called after the game loop has stopped running before exiting. More... | |
virtual void | Initialize () |
Called after the Game and GraphicsDevice are created, but before LoadContent. Reference page contains code sample. More... | |
virtual void | OnActivated (object sender, EventArgs args) |
Raises the Activated event. Override this method to add code to handle when the game gains focus. More... | |
virtual void | OnDeactivated (object sender, EventArgs args) |
Raises the Deactivated event. Override this method to add code to handle when the game loses focus. More... | |
virtual void | OnExiting (object sender, EventArgs args) |
Raises an Exiting event. Override this method to add code to handle when the game is exiting. More... | |
virtual void | OnWindowCreated () |
virtual bool | ShowMissingRequirementMessage (Exception exception) |
This is used to display an error message if there is no suitable graphics device or sound card. More... | |
virtual void | UnloadContent () |
Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources. More... | |
virtual void | Update (GameTime gameTime) |
Reference page contains links to related conceptual articles. More... | |
![]() | |
ComponentBase () | |
Initializes a new instance of the ComponentBase class. More... | |
ComponentBase (string name) | |
Initializes a new instance of the ComponentBase class. More... | |
virtual void | OnNameChanged () |
Called when Name property was changed. More... | |
Protected Attributes | |
readonly ILogger | Log |
Properties | |
GameTime | UpdateTime [get] |
Gets the current update time from the start of the game. More... | |
GameTime | DrawTime [get] |
Gets the current draw time from the start of the game. More... | |
float | DrawInterpolationFactor [get, set] |
Gets the draw interpolation factor, which is (UpdateTime - DrawTime) / TargetElapsedTime. If IsFixedTimeStep is false, it will be 0 as UpdateTime and DrawTime will be equal. More... | |
TimerTick | PlayTime [get] |
Gets the play time, can be changed to match to the time of the current rendering scene. More... | |
AssetManager | Asset [get, set] |
Gets or sets the AssetManager. More... | |
GameSystemCollection | GameSystems [get, set] |
Gets the game components registered by this game. More... | |
GameContext | Context [get, set] |
Gets the game context. More... | |
GraphicsDevice | GraphicsDevice [get] |
Gets the graphics device. More... | |
TimeSpan | InactiveSleepTime [get, set] |
Gets or sets the inactive sleep time. More... | |
bool | IsActive [get, set] |
Gets a value indicating whether this instance is active. More... | |
bool | IsFixedTimeStep [get, set] |
Gets or sets a value indicating whether this instance is fixed time step. More... | |
bool | IsDrawDesynchronized [get, set] |
Gets or sets a value indicating whether draw can happen as fast as possible, even when IsFixedTimeStep is set. More... | |
bool | EarlyExit [get, set] |
bool | IsMouseVisible [get, set] |
Gets or sets a value indicating whether the mouse should be visible. More... | |
LaunchParameters | LaunchParameters [get, set] |
Gets the launch parameters. More... | |
bool | IsRunning [get, set] |
Gets a value indicating whether is running. More... | |
ServiceRegistry | Services [get, set] |
Gets the service container. More... | |
TimeSpan | TargetElapsedTime [get, set] |
Gets or sets the target elapsed time. More... | |
GameWindow | Window [get] |
Gets the abstract window. More... | |
GameState | State [get, set] |
Vector3 | VirtualResolution [get, set] |
![]() | |
long | Id [get, set] |
string | Name [get, set] |
Gets or sets the name of this component. More... | |
bool | IsDisposed [get, set] |
Has the component been disposed or not yet. More... | |
![]() | |
long | Id [get] |
Gets the id of this component. More... | |
string | Name [get] |
Gets the name of this component. More... | |
![]() | |
int | ReferenceCount [get] |
Gets the reference count of this instance. More... | |
![]() | |
ObjectCollector | Collector [get] |
Gets the collector. More... | |
![]() | |
GameTime | UpdateTime [get] |
Gets the current game time. More... | |
GameTime | DrawTime [get] |
Gets the current draw time. More... | |
float | DrawInterpolationFactor [get] |
Gets the draw interpolation factor, which is (UpdateTime - DrawTime) / TargetElapsedTime. If IsFixedTimeStep is false, it will be 0 as UpdateTime and DrawTime will be equal. More... | |
TimerTick | PlayTime [get] |
Gets the play time, can be changed to match to the time of the current rendering scene. More... | |
AssetManager | Asset [get] |
Gets or sets the AssetManager. More... | |
GameSystemCollection | GameSystems [get] |
Gets the game components registered by this game. More... | |
GameContext | Context [get] |
Gets the game context. More... | |
GraphicsDevice | GraphicsDevice [get] |
Gets the graphics device. More... | |
TimeSpan | InactiveSleepTime [get, set] |
Gets or sets the inactive sleep time. More... | |
bool | IsActive [get] |
Gets a value indicating whether this instance is active. More... | |
bool | IsFixedTimeStep [get, set] |
Gets or sets a value indicating whether this instance is fixed time step. More... | |
bool | IsDrawDesynchronized [get, set] |
Gets or sets a value indicating whether draw can happen as fast as possible, even when IsFixedTimeStep is set. More... | |
bool | IsMouseVisible [get, set] |
Gets or sets a value indicating whether the mouse should be visible. More... | |
LaunchParameters | LaunchParameters [get] |
Gets the launch parameters. More... | |
bool | IsRunning [get] |
Gets a value indicating whether is running. More... | |
ServiceRegistry | Services [get] |
Gets the service container. More... | |
TimeSpan | TargetElapsedTime [get, set] |
Gets or sets the target elapsed time. More... | |
GameWindow | Window [get] |
Gets the abstract window. More... | |
GameState | State [get, set] |
Gets or sets the state. More... | |
![]() | |
Vector3 | VirtualResolution [get, set] |
Gets or sets the screen virtual resolution to use for this game. More... | |
Events | |
EventHandler< EventArgs > | Activated |
Occurs when [activated]. More... | |
EventHandler< EventArgs > | Deactivated |
Occurs when [deactivated]. More... | |
EventHandler< EventArgs > | Exiting |
Occurs when [exiting]. More... | |
EventHandler< EventArgs > | WindowCreated |
Occurs when [window created]. More... | |
EventHandler < GameUnhandledExceptionEventArgs > | UnhandledException |
EventHandler< EventArgs > | VirtualResolutionChanged |
![]() | |
EventHandler< EventArgs > | Activated |
Occurs when [activated]. More... | |
EventHandler< EventArgs > | Deactivated |
Occurs when [deactivated]. More... | |
EventHandler< EventArgs > | Exiting |
Occurs when [exiting]. More... | |
EventHandler< EventArgs > | WindowCreated |
Occurs when [window created]. More... | |
![]() | |
EventHandler< EventArgs > | VirtualResolutionChanged |
Occurs when the virtual resolution changed. More... | |
Additional Inherited Members | |
![]() | |
PropertyContainer | Tags |
Gets the attached properties to this component. More... | |
The game.
Definition at line 39 of file GameBase.cs.
|
protected |
Initializes a new instance of the GameBase class.
Definition at line 87 of file GameBase.cs.
References SiliconStudio.Core.Diagnostics.Log.
|
protectedvirtual |
Starts the drawing of a frame. This method is followed by calls to Draw and EndDraw.
Definition at line 676 of file GameBase.cs.
|
protectedvirtual |
Called after all components are initialized but before the first update in the game loop.
Definition at line 689 of file GameBase.cs.
|
protectedvirtual |
Disposes of object resources.
Reimplemented from SiliconStudio.Core.ComponentBase.
Definition at line 693 of file GameBase.cs.
|
protectedvirtual |
Reference page contains code sample.
gameTime | Time passed since the last call to Draw. |
Reimplemented in SiliconStudio.Paradox.Graphics.Regression.GraphicsTestBase, and SiliconStudio.Paradox.Graphics.Regression.GraphicsTestBase.
Definition at line 734 of file GameBase.cs.
References SiliconStudio.Paradox.Graphics.GraphicsDevice.BackBuffer.
|
protectedvirtual |
Ends the drawing of a frame. This method is preceeded by calls to Draw and BeginDraw.
Reimplemented in SiliconStudio.Paradox.Game.
Definition at line 751 of file GameBase.cs.
|
protectedvirtual |
Called after the game loop has stopped running before exiting.
Definition at line 760 of file GameBase.cs.
void SiliconStudio.Paradox.Games.GameBase.Exit | ( | ) |
Exits the game.
Definition at line 364 of file GameBase.cs.
|
protectedvirtual |
Called after the Game and GraphicsDevice are created, but before LoadContent. Reference page contains code sample.
Reimplemented in SiliconStudio.Paradox.Game.
Definition at line 765 of file GameBase.cs.
|
protectedvirtual |
Raises the Activated event. Override this method to add code to handle when the game gains focus.
sender | The Game. |
args | Arguments for the Activated event. |
Definition at line 788 of file GameBase.cs.
|
protectedvirtual |
Raises the Deactivated event. Override this method to add code to handle when the game loses focus.
sender | The Game. |
args | Arguments for the Deactivated event. |
Definition at line 802 of file GameBase.cs.
|
protectedvirtual |
Raises an Exiting event. Override this method to add code to handle when the game is exiting.
sender | The Game. |
args | Arguments for the Exiting event. |
Definition at line 816 of file GameBase.cs.
|
protectedvirtual |
Definition at line 825 of file GameBase.cs.
void SiliconStudio.Paradox.Games.GameBase.ResetElapsedTime | ( | ) |
Resets the elapsed time counter.
Definition at line 373 of file GameBase.cs.
void SiliconStudio.Paradox.Games.GameBase.Run | ( | GameContext | gameContext = null | ) |
Call this method to initialize the game, begin running the game loop, and start processing events for the game.
gameContext | The window Context for this game. |
System.InvalidOperationException | Cannot run this instance while it is already running |
Definition at line 441 of file GameBase.cs.
|
protectedvirtual |
This is used to display an error message if there is no suitable graphics device or sound card.
exception | The exception to display. |
Definition at line 846 of file GameBase.cs.
void SiliconStudio.Paradox.Games.GameBase.SuppressDraw | ( | ) |
Prevents calls to Draw until the next Update.
Definition at line 492 of file GameBase.cs.
void SiliconStudio.Paradox.Games.GameBase.Tick | ( | ) |
Updates the game's clock and calls Update and Draw.
Definition at line 500 of file GameBase.cs.
|
protectedvirtual |
Called when graphics resources need to be unloaded. Override this method to unload any game-specific graphics resources.
Definition at line 854 of file GameBase.cs.
|
protectedvirtual |
Reference page contains links to related conceptual articles.
gameTime | Time passed since the last call to Update. |
Reimplemented in SiliconStudio.Paradox.Graphics.Regression.TestGameBase.
Definition at line 865 of file GameBase.cs.
|
protected |
Definition at line 72 of file GameBase.cs.
|
getset |
|
getset |
|
getset |
Gets the draw interpolation factor, which is (UpdateTime - DrawTime) / TargetElapsedTime. If IsFixedTimeStep is false, it will be 0 as UpdateTime and DrawTime will be equal.
The draw interpolation factor.
Definition at line 197 of file GameBase.cs.
|
get |
Gets the current draw time from the start of the game.
The current update time.
Definition at line 183 of file GameBase.cs.
|
getset |
Definition at line 270 of file GameBase.cs.
|
getset |
Gets the game components registered by this game.
The game components.
Definition at line 221 of file GameBase.cs.
|
get |
|
getset |
Gets or sets the inactive sleep time.
The inactive sleep time.
Definition at line 250 of file GameBase.cs.
|
getset |
Gets a value indicating whether this instance is active.
true
if this instance is active; otherwise, false
.
Definition at line 256 of file GameBase.cs.
|
getset |
Gets or sets a value indicating whether draw can happen as fast as possible, even when IsFixedTimeStep is set.
true
if this instance allows desychronized drawing; otherwise, false
.
Definition at line 268 of file GameBase.cs.
|
getset |
Gets or sets a value indicating whether this instance is fixed time step.
true
if this instance is fixed time step; otherwise, false
.
Definition at line 262 of file GameBase.cs.
|
getset |
Gets or sets a value indicating whether the mouse should be visible.
true
if the mouse should be visible; otherwise, false
.
Definition at line 277 of file GameBase.cs.
|
getset |
Gets a value indicating whether is running.
Definition at line 302 of file GameBase.cs.
|
getset |
|
get |
Gets the play time, can be changed to match to the time of the current rendering scene.
The play time.
Definition at line 204 of file GameBase.cs.
|
getset |
Gets the service container.
The service container.
Definition at line 308 of file GameBase.cs.
Referenced by SiliconStudio.Paradox.Effects.Modules.RenderPipelineLightingFactory.CreateDefaultDeferred(), SiliconStudio.Paradox.Effects.Modules.RenderPipelineLightingFactory.CreateDefaultForward(), and SiliconStudio.Paradox.Effects.RenderPipelineFactory.CreateSimple().
|
getset |
Definition at line 332 of file GameBase.cs.
|
getset |
Gets or sets the target elapsed time.
The target elapsed time.
Definition at line 314 of file GameBase.cs.
|
get |
Gets the current update time from the start of the game.
The current update time.
Definition at line 171 of file GameBase.cs.
|
getset |
Definition at line 335 of file GameBase.cs.
|
get |
EventHandler<EventArgs> SiliconStudio.Paradox.Games.GameBase.Activated |
Occurs when [activated].
Definition at line 143 of file GameBase.cs.
EventHandler<EventArgs> SiliconStudio.Paradox.Games.GameBase.Deactivated |
Occurs when [deactivated].
Definition at line 148 of file GameBase.cs.
EventHandler<EventArgs> SiliconStudio.Paradox.Games.GameBase.Exiting |
Occurs when [exiting].
Definition at line 153 of file GameBase.cs.
EventHandler<GameUnhandledExceptionEventArgs> SiliconStudio.Paradox.Games.GameBase.UnhandledException |
Definition at line 160 of file GameBase.cs.
EventHandler<EventArgs> SiliconStudio.Paradox.Games.GameBase.VirtualResolutionChanged |
Definition at line 350 of file GameBase.cs.
EventHandler<EventArgs> SiliconStudio.Paradox.Games.GameBase.WindowCreated |
Occurs when [window created].
Definition at line 158 of file GameBase.cs.