WoopWoop-Docs
Loading...
Searching...
No Matches
Static Public Member Functions | Static Public Attributes | Properties | Static Private Member Functions | Static Private Attributes | List of all members
WoopWoop.WoopWoopEngine Class Reference

The main engine class responsible for managing the game loop and rendering. More...

Static Public Member Functions

static void Start (Game game_)
 Starts the engine, opens the window, and begins the game loop.
 
static void UpdateEntities ()
 Updates all entities.
 
static void AddToRenderBatch (Renderer renderer)
 Adds a renderer to the rendering batch.
 
static void ChangeRenderLayer (Renderer r)
 Changes the renderer's layer and updates render batches.
 

Static Public Attributes

static string windowTitle = "Game"
 The title of the game window.
 
static readonly int screenWidth = 1920
 The width of the screen.
 
static readonly int screenHeight = 1080
 The height of the screen.
 
static rlRenderBatch renderBatch
 The render batch for organizing rendering.
 

Properties

static bool IsInDebugMenu = false [get, set]
 Gets or sets a value indicating whether the engine is in debug menu mode.
 

Static Private Member Functions

static void Init (Game game_)
 Initializes the engine.
 
static void InitRaylibSystems ()
 Initializes Raylib systems.
 
static void InitCamera ()
 Initializes the main and debug cameras.
 
static void Cleanup ()
 Cleans up resources and closes the window.
 
static void InitEvents ()
 Initializes all of the event listeners around the engine.
 
static void HandleUpdateGameInstance ()
 Handles the game update logic.
 
static void HandleRenderFrame ()
 Renders the frame.
 
static void UpdateEntity (Entity e)
 Updates individual entities.
 
static void HandleDebugMenu ()
 Handles the debug menu logic.
 
static void HandleCameraSwitch ()
 Handles switching of the main camera.
 
static IEnumerable< List< Entity > > GetEntityBatches ()
 Splits entities into batches for parallel processing.
 
static void RenderFrame ()
 Renders the frame.
 
static void DrawGizmos (Entity entity)
 Draws gizmos for debug rendering.
 
static void OnEndOfFrame ()
 Invokes the OnEndOfFrame method for all components on all entities.
 

Static Private Attributes

static ? Game game
 Reference to the current game instance.
 
static Stopwatch stopwatch = new()
 Stopwatch for measuring delta time.
 
static float deltaTime = 0
 The time between two consecutive frames.
 
static int batchSize = 30
 The size of entity batches for processing.
 
static Thread updateGameInstanceThread
 Thread for updating the game instance.
 
static Entity[] currentFrameEntities
 Array of entities for the current frame.
 
static bool updateEntitiesArray = false
 
static Camera mainCamera
 The main camera used for rendering.
 
static Camera debugCamera
 The debug camera used for rendering debug views.
 
static Dictionary< int, List< Renderer > > renderBatches
 Dictionary to store render batches by layer.
 

Detailed Description

The main engine class responsible for managing the game loop and rendering.

Member Function Documentation

◆ AddToRenderBatch()

static void WoopWoop.WoopWoopEngine.AddToRenderBatch ( Renderer renderer)
static

Adds a renderer to the rendering batch.

Parameters
rendererThe renderer to add.

◆ ChangeRenderLayer()

static void WoopWoop.WoopWoopEngine.ChangeRenderLayer ( Renderer r)
static

Changes the renderer's layer and updates render batches.

Parameters
rThe renderer to update.

◆ Cleanup()

static void WoopWoop.WoopWoopEngine.Cleanup ( )
staticprivate

Cleans up resources and closes the window.

◆ DrawGizmos()

static void WoopWoop.WoopWoopEngine.DrawGizmos ( Entity entity)
staticprivate

Draws gizmos for debug rendering.

Parameters
entityThe entity to draw gizmos for.

◆ GetEntityBatches()

static IEnumerable< List< Entity > > WoopWoop.WoopWoopEngine.GetEntityBatches ( )
staticprivate

Splits entities into batches for parallel processing.

◆ HandleCameraSwitch()

static void WoopWoop.WoopWoopEngine.HandleCameraSwitch ( )
staticprivate

Handles switching of the main camera.

◆ HandleDebugMenu()

static void WoopWoop.WoopWoopEngine.HandleDebugMenu ( )
staticprivate

Handles the debug menu logic.

◆ HandleRenderFrame()

static void WoopWoop.WoopWoopEngine.HandleRenderFrame ( )
staticprivate

Renders the frame.

◆ HandleUpdateGameInstance()

static void WoopWoop.WoopWoopEngine.HandleUpdateGameInstance ( )
staticprivate

Handles the game update logic.

◆ Init()

static void WoopWoop.WoopWoopEngine.Init ( Game game_)
staticprivate

Initializes the engine.

Parameters
game_Reference to the game object.

◆ InitCamera()

static void WoopWoop.WoopWoopEngine.InitCamera ( )
staticprivate

Initializes the main and debug cameras.

◆ InitEvents()

static void WoopWoop.WoopWoopEngine.InitEvents ( )
staticprivate

Initializes all of the event listeners around the engine.

◆ InitRaylibSystems()

static void WoopWoop.WoopWoopEngine.InitRaylibSystems ( )
staticprivate

Initializes Raylib systems.

◆ OnEndOfFrame()

static void WoopWoop.WoopWoopEngine.OnEndOfFrame ( )
staticprivate

Invokes the OnEndOfFrame method for all components on all entities.

◆ RenderFrame()

static void WoopWoop.WoopWoopEngine.RenderFrame ( )
staticprivate

Renders the frame.

◆ Start()

static void WoopWoop.WoopWoopEngine.Start ( Game game_)
static

Starts the engine, opens the window, and begins the game loop.

Parameters
game_Reference to the game object.

◆ UpdateEntities()

static void WoopWoop.WoopWoopEngine.UpdateEntities ( )
static

Updates all entities.

◆ UpdateEntity()

static void WoopWoop.WoopWoopEngine.UpdateEntity ( Entity e)
staticprivate

Updates individual entities.

Parameters
eThe entity to update.

Member Data Documentation

◆ batchSize

int WoopWoop.WoopWoopEngine.batchSize = 30
staticprivate

The size of entity batches for processing.

◆ currentFrameEntities

Entity [] WoopWoop.WoopWoopEngine.currentFrameEntities
staticprivate

Array of entities for the current frame.

◆ debugCamera

Camera WoopWoop.WoopWoopEngine.debugCamera
staticprivate

The debug camera used for rendering debug views.

◆ deltaTime

float WoopWoop.WoopWoopEngine.deltaTime = 0
staticprivate

The time between two consecutive frames.

◆ game

? Game WoopWoop.WoopWoopEngine.game
staticprivate

Reference to the current game instance.

◆ mainCamera

Camera WoopWoop.WoopWoopEngine.mainCamera
staticprivate

The main camera used for rendering.

◆ renderBatch

rlRenderBatch WoopWoop.WoopWoopEngine.renderBatch
static

The render batch for organizing rendering.

◆ renderBatches

Dictionary<int, List<Renderer> > WoopWoop.WoopWoopEngine.renderBatches
staticprivate

Dictionary to store render batches by layer.

◆ screenHeight

readonly int WoopWoop.WoopWoopEngine.screenHeight = 1080
static

The height of the screen.

◆ screenWidth

readonly int WoopWoop.WoopWoopEngine.screenWidth = 1920
static

The width of the screen.

◆ stopwatch

Stopwatch WoopWoop.WoopWoopEngine.stopwatch = new()
staticprivate

Stopwatch for measuring delta time.

◆ updateEntitiesArray

bool WoopWoop.WoopWoopEngine.updateEntitiesArray = false
staticprivate

◆ updateGameInstanceThread

Thread WoopWoop.WoopWoopEngine.updateGameInstanceThread
staticprivate

Thread for updating the game instance.

◆ windowTitle

string WoopWoop.WoopWoopEngine.windowTitle = "Game"
static

The title of the game window.

Property Documentation

◆ IsInDebugMenu

bool WoopWoop.WoopWoopEngine.IsInDebugMenu = false
staticgetset

Gets or sets a value indicating whether the engine is in debug menu mode.


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