public class BattleStartedEvent extends BattleEvent
onBattleStarted() when a new battle is started.IBattleListener,
BattleCompletedEvent,
BattleFinishedEvent| Constructor | Description |
|---|---|
BattleStartedEvent(BattleRules battleRules,
int robotsCount,
boolean isReplay) |
Called by the game to create a new BattleStartedEvent.
|
| Modifier and Type | Method | Description |
|---|---|---|
BattleRules |
getBattleRules() |
Returns the rules that will be used in the battle.
|
int |
getRobotsCount() |
Returns the number of robots participating in the battle.
|
boolean |
isReplay() |
Checks if this battle is a replay or a new battle.
|
public BattleStartedEvent(BattleRules battleRules, int robotsCount, boolean isReplay)
battleRules - the rules that will be used in the battle.robotsCount - the number of robots participating in the battle.isReplay - a flag specifying if this battle is a replay or real battle:
true if the battle is a replay; false otherwise.public BattleRules getBattleRules()
public int getRobotsCount()
public boolean isReplay()
true if the battle is a replay; false otherwise.Copyright © 2018. All rights reserved.