You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a round of the game ends, we need to reset the player's state, so we created a ResetStateCommand to reset the player's state before a new round of the game starts.
Below is the player onChange listener to set players when the player's state changes. But when the below server executes the reset command, player.onChange won't pick up the changes. But when I looked into the colyseus monitor, the player's state did change.
Did I do something wrong? What's the best practice to prevent something like this to happen? What's the best practice to make the client-side sync callbacks trigger when the server executes the state changes?
The text was updated successfully, but these errors were encountered:
When a round of the game ends, we need to reset the player's state, so we created a
ResetStateCommand
to reset the player's state before a new round of the game starts.Below is the player onChange listener to set players when the player's state changes. But when the below server executes the reset command,
player.onChange
won't pick up the changes. But when I looked into the colyseus monitor, the player's state did change.Below are the server codes to execute the player's state change.
Did I do something wrong? What's the best practice to prevent something like this to happen? What's the best practice to make the client-side sync callbacks trigger when the server executes the state changes?
The text was updated successfully, but these errors were encountered: