In JavaScript side, is there a way to detect that the game is in replay mode? For example, I do not want to run this code which starts a timer unless the game is really active.
Code: Select all
onUpdateActionButtons: function(stateName, args) {
console.log('Update action buttons: ' + stateName, args);
if (this.isCurrentPlayerActive()) {
var timer = setInterval( ... , 1000);