posodobitve
This commit is contained in:
26
GAMESCENE_KEYBOARD_BINDINGS.js
Normal file
26
GAMESCENE_KEYBOARD_BINDINGS.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// GAMESCENE.JS - KEYBOARD BINDINGS
|
||||
// Dodaj te key listenere v setupCamera() metodo
|
||||
|
||||
// R key - Rotate building
|
||||
this.input.keyboard.on('keydown-R', () => {
|
||||
if (this.buildSystem && this.buildSystem.buildMode) {
|
||||
this.buildSystem.rotatePreview();
|
||||
}
|
||||
});
|
||||
|
||||
// E key - Confirm placement
|
||||
this.input.keyboard.on('keydown-E', () => {
|
||||
if (this.buildSystem && this.buildSystem.buildMode) {
|
||||
this.buildSystem.confirmPlacement();
|
||||
}
|
||||
});
|
||||
|
||||
// ESC key - Cancel (posodobi obstoječi ESC listener)
|
||||
this.input.keyboard.on('keydown-ESC', () => {
|
||||
if (this.buildSystem && this.buildSystem.buildMode) {
|
||||
this.buildSystem.cancelPlacement();
|
||||
} else {
|
||||
// Existing ESC functionality
|
||||
this.togglePauseMenu();
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user