Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/plugins/thoughtsNetworkPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ export class ThoughtsNetworkPlugin implements GameNetworkPlugin {
if (message.playerId !== state.localPlayerId && this.gameStateRef) {
const player = this.gameStateRef.players.get(message.playerId)
if (player) {
console.log(`👋 Player ${message.playerId} left the game`)
this.gameStateRef.removePlayer(message.playerId)
console.log(`📊 ${this.gameStateRef.players.size} players remaining`)
}
}
}
Expand Down Expand Up @@ -217,14 +215,11 @@ export class ThoughtsNetworkPlugin implements GameNetworkPlugin {
const player = this.gameStateRef.players.get(message.playerId)
if (player) {
player.shape = message.shape
const shapeNames = ['Sphere', 'Cube', 'Pyramid']
console.log(`🔄 Player ${message.playerId} changed to: ${shapeNames[message.shape]}`)
}
}
}

private handleGameState(message: ThoughtsMessage, context: NetworkContext): void {
console.log('🎮 Received game state update:', message)

const state = context.getGameState<ThoughtsGameState>()

Expand Down Expand Up @@ -280,7 +275,6 @@ export class ThoughtsNetworkPlugin implements GameNetworkPlugin {
lastPositionSent: now
}))

console.log('📤 Sent position update:', position)
}

sendShapeUpdate(shape: ShapeType, context: NetworkContext): void {
Expand All @@ -289,6 +283,5 @@ export class ThoughtsNetworkPlugin implements GameNetworkPlugin {
shape: shape,
timestamp: Date.now()
})
console.log('📤 Sent shape update:', shape)
}
}