mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-08 17:57:02 +08:00
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.
21 lines
312 B
C++
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
|