Skip to content

Commit

Permalink
ReplayPlaybackSystem now returns the action performed in nextStep
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Mar 20, 2015
1 parent 8775d6f commit 4f4a5cf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public boolean isReplayFinished() {
return currentActionIndex >= replayData.getActionInformation().size();
}

public void nextStep() {
public ReplayAction nextStep() {
ReplayAction step = replayData.getActionInformation().get(currentActionIndex);
Entity entity = game.getEntity(step.getEntity());
ECSAction action = Actions.getAction(entity, step.getActionName());
Expand All @@ -140,6 +140,7 @@ public void nextStep() {
throw new ReplayException("Replay action not correctly performed " + action + " at action index " + currentActionIndex);
}
currentActionIndex++;
return step;
}

public void setPlayerConfigs(ECSGame game) {
Expand Down

0 comments on commit 4f4a5cf

Please sign in to comment.