Add debug output on reset in play_state

This commit is contained in:
rexy712 2022-01-17 14:57:13 -08:00
parent 512cd70145
commit 6580fdd4d5
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ int board::click_collision_cheat(const math::vec3<GLfloat>& unproj_3)const{
math::vec3<GLfloat> projected1 = {mod_coord[0], mod_coord[1], mod_coord[2]};
for(size_t i = 0;i < 9;++i){
tile& sq = m_tiles[i];
const tile& sq = m_tiles[i];
const math::vec3<GLfloat>& sq_pos = sq.position();
if((projected1.x() > (sq_pos.x() - 1.0f) && projected1.x() < (sq_pos.x() + 1.0f)) &&
(projected1.y() > (sq_pos.y() - 1.0f) && projected1.y() < (sq_pos.y() + 1.0f)))

View File

@ -75,6 +75,7 @@ void play_state::handle_input(const egn::input_event& ev){
}else if(ev.key == GLFW_KEY_ESCAPE && !ev.mods && ev.action == GLFW_PRESS){
m_owner->on_notify({egn::game_state_event::state_type::SHOULD_CLOSE, 0, 0});
}else if(ev.key == GLFW_KEY_R && !ev.mods && ev.action == GLFW_PRESS){
debug_print("Resetting board state\n");
static_cast<board&>(*m_scene.objects[0]).reset();
}
}else if(ev.ev_type == egn::input_event::type::RESIZE){