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

◆ replaceState()

void Flint::StateManager::replaceState ( std::unique_ptr< State > state)

Replace the current state with a new one.

Safely exits and removes the old top, then pushes the provided state and enters it.

Parameters
stateReplacement state; if null, the stack simply loses its top.