Commit 14067c2b authored by Georg Schaefer's avatar Georg Schaefer
Browse files

set play state as default for debug reasons

parent ee8303d2
......@@ -9,14 +9,14 @@
namespace gdw {
game_state_machine::game_state_machine(engine& engine):engine_(engine), current_state_(nullptr) {
game_states_[type_id<play_state>()] = make_unique<play_state>(engine);
game_states_[type_id<menu_state>()] = make_unique<menu_state>(engine);
game_states_[type_id<credits_state>()] = make_unique<credits_state>(engine);
game_states_[type_id<play_state>()] = make_unique<play_state>(engine);
//game_states_[type_id<menu_state>()] = make_unique<menu_state>(engine);
//game_states_[type_id<credits_state>()] = make_unique<credits_state>(engine);
//default state
//current_state_ = game_states_[type_id<play_state>()].get();
current_state_ = game_states_[type_id<menu_state>()].get();
current_state_->on_enter();
//default state
//current_state_ = game_states_[type_id<play_state>()].get();
current_state_ = game_states_[type_id<play_state>()].get();
current_state_->on_enter();
}
game_state_machine::~game_state_machine() {
......@@ -24,8 +24,8 @@ game_state_machine::~game_state_machine() {
}
void game_state_machine::update(float dt) {
if(current_state_)
current_state_->update(dt);
if(current_state_)
current_state_->update(dt);
}
} //namespace gdw
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment