ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
Loading...
Searching...
No Matches
Imago::Engine::SceneContext Struct Reference

Gives systems access to the persistent engine objects they could need. More...

#include <Imago/Engine/SceneContext.hpp>

Collaboration diagram for Imago::Engine::SceneContext:

Public Attributes

ECS::Nexus * nexus = nullptr
 the active Scene's nexus
Broadcaster * broadcaster = nullptr
 the active Scene's broadcaster
EngineControl * engine = nullptr
 how systems send requests to the Game (switch_scene and quit)
InputState * input = nullptr
 how users query for actions
AssetManager * assets = nullptr
 the loaded assets, owned by the Game
sf::RenderWindow * window = nullptr
 the render window, owned by the Game

Detailed Description

Gives systems access to the persistent engine objects they could need.

This is created by the Game which will fill in what it owns (window, assets, input), and leave the pointers it does not own as nullptr. It will then pass it down through the SceneManager to the Scene which will fill in the Nexus and the Broadcaster. Every pointer is a raw pointer because it is non-owning.


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