Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches
Flint::State Class Referenceabstract

Abstract base for a single game state (scene / screen). More...

#include <flint/core/state.h>

+ Collaboration diagram for Flint::State:

Public Member Functions

virtual void handleInput (IWindow &window)=0
 Process raw input events and translate them into state-specific actions.
 
virtual void update (float deltaTime)=0
 Advance the simulation logic for this state by deltaTime seconds.
 
virtual void render (GPURenderer &gpuRenderer, IWindow &window)=0
 Issue all draw calls necessary to visualize this state.
 
virtual void onEnter ()
 Called immediately after this state becomes the top of the stack.
 
virtual void onExit ()
 Called immediately before this state is removed from the top of the stack.
 

Protected Attributes

std::string m_contextName
 

Detailed Description

Abstract base for a single game state (scene / screen).

Each concrete State owns its own input handling, update logic, and rendering. States are managed on a stack by StateManager and receive lifecycle callbacks via onEnter() / onExit().

Definition at line 20 of file state.h.


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