- Joined
- Oct 30, 2015
- Messages
- 9
- Reaction score
- 0
- First Language
- English
So I've used the search function to try and answer this question first, however the only thing I could find was this by DoubleX;
In this I can see that the "BattleManager" keeps track of the case 'turn' but I'm unsure of how to call for this info. Is it as simple as "if BattleManager.turn = x" or do I need to alter this process to export the result to a global variable each turn that I can then call and then alter the battleEnd to reset the variables value to zero?
BattleManager.update = function() {
if (!this.isBusy() && !this.updateEvent()) {
switch (this._phase) {
case 'start':
this.startInput();
break;
case 'turn':
this.updateTurn();
break;
case 'action':
this.updateAction();
break;
case 'turnEnd':
this.updateTurnEnd();
break;
case 'battleEnd':
this.updateBattleEnd();
break;
}
}
};
if (!this.isBusy() && !this.updateEvent()) {
switch (this._phase) {
case 'start':
this.startInput();
break;
case 'turn':
this.updateTurn();
break;
case 'action':
this.updateAction();
break;
case 'turnEnd':
this.updateTurnEnd();
break;
case 'battleEnd':
this.updateBattleEnd();
break;
}
}
};
In this I can see that the "BattleManager" keeps track of the case 'turn' but I'm unsure of how to call for this info. Is it as simple as "if BattleManager.turn = x" or do I need to alter this process to export the result to a global variable each turn that I can then call and then alter the battleEnd to reset the variables value to zero?

