31 lines
690 B
TypeScript
31 lines
690 B
TypeScript
import type { KeyCode } from "./input_manager.ts";
|
|
|
|
// the player's settings, like minecraft's Options and its key mappings
|
|
export class Options {
|
|
render_distance = 6;
|
|
|
|
key_forward: KeyCode = "KeyW";
|
|
key_back: KeyCode = "KeyS";
|
|
key_left: KeyCode = "KeyA";
|
|
key_right: KeyCode = "KeyD";
|
|
key_jump: KeyCode = "Space";
|
|
key_sprint: KeyCode = "ShiftLeft";
|
|
key_inventory: KeyCode = "KeyE";
|
|
// with ctrl it drops the whole stack
|
|
key_drop: KeyCode = "KeyQ";
|
|
key_chat: KeyCode = "KeyT";
|
|
key_debug: KeyCode = "F3";
|
|
key_fullscreen: KeyCode = "F11";
|
|
key_hotbar: KeyCode[] = [
|
|
"Digit1",
|
|
"Digit2",
|
|
"Digit3",
|
|
"Digit4",
|
|
"Digit5",
|
|
"Digit6",
|
|
"Digit7",
|
|
"Digit8",
|
|
"Digit9",
|
|
];
|
|
}
|