GameExtensions.cs
GameExtensions.cs
provides a suite of extension methods for the Game class in the Stride game engine, enhancing its capabilities and offering convenient functionalities to game developers. These methods streamline common tasks in game development, ranging from performance monitoring to material creation and entity manipulation.
Here's a brief overview of the functionalities provided by these extension methods:
AddAllDirectionLighting()
- Adds directional lighting from multiple angles to the current sceneAddProfiler()
- Adds a profiler to the game, which can be toggled on/off with Left Shift + Left Ctrl + PCreateMaterial()
- Creates a basic material with optional color, specular reflection, and micro-surface smoothness valuesCreate2DPrimitive()
- Creates a primitive 2D model entity of the specified type with optional customizationsCreate3DPrimitive()
- Creates a primitive 3D model entity of the specified type with optional customizationsDeltaTime()
- Gets the time elapsed since the last game update in seconds as a single-precision floating-point numberDeltaTimeAccurate()
- Gets the time elapsed since the last game update in seconds as a double-precision floating-pointFPS()
- Retrieves the current frames per second (FPS) rate of the running gameSetFocusLostFPS()
- Sets the maximum frames per second (FPS) rate for the game when not in focusSetMaxFPS()
- Sets the maximum frames per second (FPS) rate for the game
AddEntityNames()
- Debug. To see entity properties in the gameAddPhysicsDebugger()
- Debug. To see colliders. Tracked here Issue #9