feat: implement sentences mode with centered text and slower speed
- Set sentence fall speed to 25 pixels/second - Replace sentences with longer, realistic ones including commas and punctuation - Sentences always render centered on screen (80% max width constraint) - Ship stays centered during sentence mode (no horizontal movement) - Add punctuation support (. , ! ?) to keyboard input - Disable auto-tracking for sentence/paragraph modes
This commit is contained in:
@@ -30,9 +30,9 @@ export const useKeyBindings = (gameManager: GameManager) => {
|
||||
return;
|
||||
}
|
||||
|
||||
// handle letter typing during game
|
||||
// handle letter and punctuation typing during game
|
||||
if (gameManager.gameStatus === "started") {
|
||||
if (ev.key.length === 1 && /[a-zA-Z]/.test(ev.key)) {
|
||||
if (ev.key.length === 1 && /[a-zA-Z.,!?]/.test(ev.key)) {
|
||||
gameManager.handleTypedLetter(ev.key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user