|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrobocode.control.events.BattleAdaptor
public abstract class BattleAdaptor
An abstract adapter class for receiving battle events by implementing the IBattleListener.
The methods in this class are empty. This class exists as convenience for creating listener objects.
private class BattleObserver extends BattleAdaptor {
boolean isReplay;
public void onBattleStarted(BattleStartedEvent event) {
isReplay = event.isReplay();
}
public void onBattleCompleted(BattleCompletedEvent event) {
if (!isReplay) {
printResultsData(event);
}
}
IBattleListener| Constructor Summary | |
|---|---|
BattleAdaptor()
Creates a BattleAdaptor. |
|
| Method Summary | |
|---|---|
void |
onBattleCompleted(BattleCompletedEvent event)
This method is called when the battle has completed successfully and results are available. |
void |
onBattleError(BattleErrorEvent event)
This method is called when the game has sent an error message. |
void |
onBattleFinished(BattleFinishedEvent event)
This method is called when the battle has finished. |
void |
onBattleMessage(BattleMessageEvent event)
This method is called when the game has sent a new information message. |
void |
onBattlePaused(BattlePausedEvent event)
This method is called when the battle has been paused, either by the user or the game. |
void |
onBattleResumed(BattleResumedEvent event)
This method is called when the battle has been resumed (after having been paused). |
void |
onBattleStarted(BattleStartedEvent event)
This method is called when a new battle has started. |
void |
onRoundEnded(RoundEndedEvent event)
This method is called when the current round of a battle has ended. |
void |
onRoundStarted(RoundStartedEvent event)
This method is called when a new round in a battle has started. |
void |
onTurnEnded(TurnEndedEvent event)
This method is called when the current turn in a battle round is ended. |
void |
onTurnStarted(TurnStartedEvent event)
This method is called when a new turn in a battle round has started. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BattleAdaptor()
| Method Detail |
|---|
public void onBattleStarted(BattleStartedEvent event)
onBattleStarted in interface IBattleListenerevent - the event details.BattleStartedEvent,
IBattleListener.onBattleCompleted(BattleCompletedEvent),
IBattleListener.onBattleFinished(BattleFinishedEvent)public void onBattleFinished(BattleFinishedEvent event)
onBattleFinished in interface IBattleListenerevent - the event details.BattleFinishedEvent,
IBattleListener.onBattleStarted(BattleStartedEvent),
IBattleListener.onBattleCompleted(BattleCompletedEvent)public void onBattleCompleted(BattleCompletedEvent event)
onBattleCompleted in interface IBattleListenerevent - the event details.BattleCompletedEvent,
IBattleListener.onBattleStarted(BattleStartedEvent),
IBattleListener.onBattleFinished(BattleFinishedEvent)public void onBattlePaused(BattlePausedEvent event)
onBattlePaused in interface IBattleListenerevent - the event details.BattlePausedEvent,
IBattleListener.onBattleResumed(BattleResumedEvent)public void onBattleResumed(BattleResumedEvent event)
onBattleResumed in interface IBattleListenerevent - the event details.BattleResumedEvent,
IBattleListener.onBattlePaused(BattlePausedEvent)public void onRoundStarted(RoundStartedEvent event)
onRoundStarted in interface IBattleListenerevent - the event details.RoundEndedEvent,
IBattleListener.onRoundEnded(RoundEndedEvent)public void onRoundEnded(RoundEndedEvent event)
onRoundEnded in interface IBattleListenerevent - the event details.RoundEndedEvent,
IBattleListener.onRoundStarted(RoundStartedEvent)public void onTurnStarted(TurnStartedEvent event)
onTurnStarted in interface IBattleListenerevent - the event details.TurnStartedEvent,
IBattleListener.onTurnEnded(TurnEndedEvent)public void onTurnEnded(TurnEndedEvent event)
onTurnEnded in interface IBattleListenerevent - the event details.TurnEndedEvent,
IBattleListener.onTurnStarted(TurnStartedEvent)public void onBattleMessage(BattleMessageEvent event)
onBattleMessage in interface IBattleListenerevent - the event details.BattleMessageEvent,
IBattleListener.onBattleError(BattleErrorEvent)public void onBattleError(BattleErrorEvent event)
onBattleError in interface IBattleListenerevent - the event details.BattleErrorEvent,
IBattleListener.onBattleMessage(BattleMessageEvent)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||