R-Type 0.1
Loading...
Searching...
No Matches
rtk::Game Concept Reference

Requirements for a type that GameEngine::run() can drive. More...

#include <Game.hpp>

Concept definition

template<typename T>
concept rtk::Game = requires(T &game, EngineContext &context) {
{ game.onLoad(context) } -> std::same_as<void>;
}
Requirements for a type that GameEngine::run() can drive.
Definition Game.hpp:22

Detailed Description

Requirements for a type that GameEngine::run() can drive.

onLoad(EngineContext &) is required. onUpdate(EngineContext &, float), shouldContinue() and onUnload(EngineContext &) are called when present.

Template Parameters
TCandidate game type.