Engine
Raylib based game framework
Loading...
Searching...
No Matches
Event::CloseGame Struct Reference

Event signalling that the game should close. More...

#include <Events.hpp>

Static Public Member Functions

static void LuaRegister (sol::state &lua)
 Registers the CloseGame type with Lua.

Detailed Description

Event signalling that the game should close.

Trigger this event to request a clean shutdown. The Engine listens for it and exits the main loop at the end of the current frame.

Usage:

DISPATCHER.trigger<Event::CloseGame>();
Event signalling that the game should close.
Definition Events.hpp:24

Member Function Documentation

◆ LuaRegister()

void Event::CloseGame::LuaRegister ( sol::state & lua)
inlinestatic

Registers the CloseGame type with Lua.

Called automatically by LuaManager::RegisterReceiveEvent and LuaManager::RegisterSendEvent. After registration, scripts can construct and trigger the event via "TriggerCloseGameEvent()".

Parameters
luaLua state to register into

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