Skip to content

Commit

Permalink
Improve backgroud flashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael committed Sep 8, 2015
1 parent 9460893 commit 19003ab
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/src/main/java/de/sopa/scene/justplay/JustPlayGameScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,26 @@ public class JustPlayGameScene extends GameScene implements JustPlaySceneObserve
public JustPlayGameScene(JustPlayLevel justPlayLevel) {

super(justPlayLevel.getLevel());
gameViewBackground = new Rectangle(0f, getTileSceneStartY() + spacePerTile, camera.getWidth(), camera.getWidth(), vbom);
gameViewBackground.setColor(1f,1f,1f,0f);
attachChild(gameViewBackground);
leaveScene = false;
initializeWarningFlash();
timeBasedGameService = new TimeBasedGameServiceImpl(justPlayLevel.getLeftTime());
timeBasedGameService.start();
timeBasedGameService.attach(this);
leftTime.setText(String.valueOf(justPlayLevel.getLeftTime()));
}

private void initializeWarningFlash() {
gameViewBackground = new Rectangle(0f, getTileSceneStartY() + spacePerTile, camera.getWidth(), camera.getWidth(), vbom);
gameViewBackground.setColor(1f,1f,1f,0f);
attachChild(gameViewBackground);
}


public JustPlayGameScene(TimeBasedGameService timeBasedGameService, JustPlayLevel justPlayLevel) {

super(justPlayLevel.getLevel());
leaveScene = false;
initializeWarningFlash();
this.timeBasedGameService = timeBasedGameService;

timeBasedGameService.attach(this);
Expand Down

0 comments on commit 19003ab

Please sign in to comment.