Skip to content

Commit

Permalink
events內的message也要出現
Browse files Browse the repository at this point in the history
  • Loading branch information
Parsons committed Jul 30, 2024
1 parent ca8367c commit d23530e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/PhaserGame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ onMounted(() => {
}
for (let i = 0; i < res.events.length; i++) {
const event = res.events[i]
messages.value.push(`${getTimeString()}: ${event.message}`)
if (messages.value.length > 10) {
messages.value.shift()
}
await myGame.value.eventHandler(event)
}
return
Expand Down

0 comments on commit d23530e

Please sign in to comment.