feat(thought): wire client socket, GameScene thought handling, emoji animation, and info panel display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,6 +17,7 @@ export class SocketClient {
|
||||
onNarrationEvent: ((data: NarrationEvent) => void) | null = null;
|
||||
onNarrationUpdate: ((data: { id: number; narration: string }) => void) | null = null;
|
||||
onNarrationHistory: ((data: NarrationEvent[]) => void) | null = null;
|
||||
onNpcThought: ((data: { entityId: number; text: string; emoji: string }) => void) | null = null;
|
||||
|
||||
constructor(url: string) {
|
||||
this.socket = io(url);
|
||||
@@ -48,6 +49,7 @@ export class SocketClient {
|
||||
this.socket.on('narration-event', (data) => this.onNarrationEvent?.(data));
|
||||
this.socket.on('narration-update', (data) => this.onNarrationUpdate?.(data));
|
||||
this.socket.on('narration-history', (data) => this.onNarrationHistory?.(data));
|
||||
this.socket.on('npc-thought', (data) => this.onNpcThought?.(data));
|
||||
}
|
||||
|
||||
get playerId(): string | null { return this._playerId; }
|
||||
|
||||
Reference in New Issue
Block a user