implement load config on game restart
This commit is contained in:
@@ -26,12 +26,17 @@ class WaveSystem;
|
||||
class Simulation
|
||||
{
|
||||
public:
|
||||
explicit Simulation(const GameConfig& config, unsigned int seed = 0);
|
||||
explicit Simulation(GameConfig config, unsigned int seed = 0);
|
||||
~Simulation();
|
||||
|
||||
const GameConfig& config() const;
|
||||
|
||||
// Reinitializes all simulation state as if constructed fresh.
|
||||
void reset(unsigned int seed = 0);
|
||||
|
||||
// Reloads config then reinitializes all simulation state.
|
||||
void reset(GameConfig newConfig, unsigned int seed = 0);
|
||||
|
||||
// Advances the simulation by one tick. Tick order per architecture.md §Tick Order.
|
||||
void tick();
|
||||
|
||||
@@ -83,7 +88,7 @@ private:
|
||||
// Award a random blueprint drop (REQ-DEF-BLUEPRINT-DROP) and emit the event.
|
||||
void awardBlueprintDrop();
|
||||
|
||||
const GameConfig& m_config;
|
||||
GameConfig m_config;
|
||||
std::mt19937 m_rng;
|
||||
|
||||
Tick m_currentTick;
|
||||
|
||||
Reference in New Issue
Block a user