GameEngine/source/client_input.c
2026-02-18 17:20:25 +01:00

18 lines
385 B
C

#include <engine.h>
void UpdateInput() {
const Input input;
int key = GetKeyPressed();
Vector2 mouse_pos = GetMousePosition();
Vector2 mouse_delta = GetMouseDelta();
while (key) {
for (PLAYER_ACTION action = 0; action < 4; action++) {
if (input.key[action] == key) {
//emit("player_intent", action);
break;
}
}
key = GetKeyPressed();
}
}