168 static void ResetSynthControllers();
171 World *GetWorld()
const {
177 return mInputMgr.get();
179 std::unique_ptr<World> mWorld;
180 std::unique_ptr<InputMgr> mInputMgr;
Driver of the World that is loading, running, or being torn down.
Definition worldmgr.h:21
void Draw()
Draw TheGfxManager, at the running world's tick or at time 0 otherwise.
Event
Values Poll() reports.
Definition worldmgr.h:32
@ kEventUnloaded
Definition worldmgr.h:36
@ kEventNone
Definition worldmgr.h:33
@ kEventRestart
Definition worldmgr.h:37
@ kEventFinished
Definition worldmgr.h:35
@ kEventLoaded
Definition worldmgr.h:34
void Init()
Initialise TheGfxManager and TheGameConfig, and mark the driver initialised.
int GetState() const
Report mState.
static WorldMgr * shared()
Report the single instance, constructing it on first use.
State
Values of mState.
Definition worldmgr.h:24
@ kStateLoading
Definition worldmgr.h:26
@ kStateUnloaded
Definition worldmgr.h:28
@ kStateIdle
Definition worldmgr.h:25
@ kStatePlaying
Definition worldmgr.h:27
void Unload()
Destroy the router and the world and enter kStateUnloaded.
void UpdateTime()
Copy two timing values of the running world into the game database.
void Reset()
Reset TheGfxManager and enter kStateIdle.
void Load()
Build the World for the selected rule set and enter kStateLoading.
~WorldMgr()
Release the driver.
void Terminate()
Destroy the world and the router if either exists, and shut down TheGfxManager.
WorldMgr()
Construct the driver with every member clear.
void Start()
Attach an InputMgr to the loaded world and enter kStatePlaying.
int Poll()
Advance the current state by one frame and report what changed.
One game in progress under one rule set.
Definition world.h:31
WorldMgr * TheWorldMgr
The world driver, WorldMgr::shared() as the unit's static initialiser stored it.