Files
Cubed/include/Cubed/input/input.hpp
zhenyan121 8bbed7b7b9 feat(client-player): add block cooldown and track mouse state
Introduce a time-based cooldown for block placement (PLACE_BLOCK_INTERVAL) to prevent rapid clicking. Replace the global InputState with per-player MouseState tracking in ClientPlayer. Rename place_block() to get_current_block() for clarity. Remove the old src/input.cpp and the Cubed/input.hpp header, moving input structures to Cubed/input/input.hpp.
2026-07-12 21:03:50 +08:00

21 lines
312 B
C++

#pragma once
#include <GLFW/glfw3.h>
namespace Cubed {
struct MoveState {
bool forward = false;
bool back = false;
bool left = false;
bool right = false;
bool down = false;
bool up = false;
};
struct MouseState {
bool left = false;
bool right = false;
};
} // namespace Cubed