Add unready toggle in lobby
- Server: Handle unready event to set player ready state to false - Client: Ready button toggles between READY and UNREADY - Client: Unready sends unready socket event to server Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,11 @@ class NetworkManager {
|
||||
this.socket.emit('ready');
|
||||
}
|
||||
|
||||
unready() {
|
||||
if (!this.socket) return;
|
||||
this.socket.emit('unready');
|
||||
}
|
||||
|
||||
sendMove(direction) {
|
||||
if (!this.socket || !this.currentPlayerId) return;
|
||||
this.socket.emit('player-move', { playerId: this.currentPlayerId, direction });
|
||||
|
||||
Reference in New Issue
Block a user