Add debug output on reset in play_state
This commit is contained in:
parent
512cd70145
commit
6580fdd4d5
@ -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)))
|
||||
|
||||
@ -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){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user