More host UI refinements, intuitive UI enhancements during gameplay pt 2.
This commit is contained in:
parent
13a490b417
commit
059edfb3d9
@ -102,6 +102,15 @@ class GolfGame {
|
|||||||
osc.stop(time + 0.05);
|
osc.stop(time + 0.05);
|
||||||
}
|
}
|
||||||
return; // Early return since we don't use the main oscillator
|
return; // Early return since we don't use the main oscillator
|
||||||
|
} else if (type === 'reject') {
|
||||||
|
// Low buzz for rejected action
|
||||||
|
oscillator.type = 'sawtooth';
|
||||||
|
oscillator.frequency.setValueAtTime(150, ctx.currentTime);
|
||||||
|
oscillator.frequency.setValueAtTime(100, ctx.currentTime + 0.08);
|
||||||
|
gainNode.gain.setValueAtTime(0.08, ctx.currentTime);
|
||||||
|
gainNode.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.12);
|
||||||
|
oscillator.start(ctx.currentTime);
|
||||||
|
oscillator.stop(ctx.currentTime + 0.12);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1492,6 +1501,10 @@ class GolfGame {
|
|||||||
this.finalTurnBadge.classList.add('hidden');
|
this.finalTurnBadge.classList.add('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Toggle not-my-turn class to disable hover effects when it's not player's turn
|
||||||
|
const isMyTurn = this.isMyTurn();
|
||||||
|
this.playerArea.classList.toggle('not-my-turn', !isMyTurn);
|
||||||
|
|
||||||
// Update status message (handled by specific actions, but set default here)
|
// Update status message (handled by specific actions, but set default here)
|
||||||
const currentPlayer = this.gameState.players.find(p => p.id === this.gameState.current_player_id);
|
const currentPlayer = this.gameState.players.find(p => p.id === this.gameState.current_player_id);
|
||||||
if (currentPlayer && currentPlayer.id !== this.playerId) {
|
if (currentPlayer && currentPlayer.id !== this.playerId) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user