I'm currently trying to call updatePageTitle() from within onUpdateActionButtons(). But it appears that calling this function causes onUpdateActionButtons() to be called again. So I get into an infinite loop and that results in a stack overflow. Now before I go and set a flag to simply ignore this second call, I wanted to ask if there was a better way to handle this?
The game I'm working on has many unique cards that players will need to react to and what they need to do is different for each card. Instead of having dozens of different states on the server, I am having a single state for "cardPlayed" which passes down which card was played as an arg. Then the client can put up a unique "descriptionmyturn" message instructing the player what they need to do to respond to it. onUpdateActionButtons() is called for each active player in this mutipleactivestate, so this seems to be the appropriate place to set the title message.
Thanks for your feedback.
The game I'm working on has many unique cards that players will need to react to and what they need to do is different for each card. Instead of having dozens of different states on the server, I am having a single state for "cardPlayed" which passes down which card was played as an arg. Then the client can put up a unique "descriptionmyturn" message instructing the player what they need to do to respond to it. onUpdateActionButtons() is called for each active player in this mutipleactivestate, so this seems to be the appropriate place to set the title message.
Thanks for your feedback.