Abstract base for a single game state (scene / screen).
More...
#include <flint/core/state.h>
|
| 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.
|
| |
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 25 of file state.h.
◆ handleInput()
| virtual void Flint::State::handleInput |
( |
IWindow & | window | ) |
|
|
pure virtual |
Process raw input events and translate them into state-specific actions.
- Parameters
-
| window | Window providing input state (keyboard, mouse, focus, etc.). |
◆ onEnter()
| virtual void Flint::State::onEnter |
( |
| ) |
|
|
inlinevirtual |
Called immediately after this state becomes the top of the stack.
Override to (re-)initialize transient state or start animations.
Definition at line 55 of file state.h.
◆ onExit()
| virtual void Flint::State::onExit |
( |
| ) |
|
|
inlinevirtual |
Called immediately before this state is removed from the top of the stack.
Override to persist data, stop sounds, or clean up transient resources.
Definition at line 63 of file state.h.
◆ render()
Issue all draw calls necessary to visualize this state.
- Parameters
-
| gpuRenderer | Renderer used for submitting GPU work. |
| window | Window supplying viewport and swap-chain context. |
◆ update()
| virtual void Flint::State::update |
( |
float | deltaTime | ) |
|
|
pure virtual |
Advance the simulation logic for this state by deltaTime seconds.
- Parameters
-
| deltaTime | Time elapsed since the previous update call. |
◆ m_contextName
| std::string Flint::State::m_contextName |
|
protected |
The documentation for this class was generated from the following file: