Skip to content
Snippets Groups Projects
Commit 609f7559 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

Merge branch 'feature-shootingrange' into 'devel'

#150 Animation duration decreased. Scene clear after game ends.



See merge request !199
parents 034e9fc4 cd655582
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.actions.ColorAction;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
......@@ -153,7 +154,10 @@ public class ShootingRangeGame extends AbstractTablexiaGame<GameState> {
}
} else {
sfxLibrary.getSound(SoundType.WRONG).play();
target.addAction(Actions.sequence(Actions.color(Color.RED,0.1f),Actions.color(target.getColor(),0.1f),Actions.color(Color.RED,0.1f),Actions.color(target.getColor(),0.1f),Actions.color(Color.RED,0.1f),Actions.color(target.getColor(),0.1f)));
target.clearActions();
ColorAction colorAction = Actions.color(new Color(Color.RED),0.02f);
ColorAction resetColor = Actions.color(target.getColor(),0.02f);
target.addAction(Actions.sequence(colorAction, resetColor, colorAction, resetColor, colorAction, resetColor));
getData().addWrongTarget();
setGameScore(Properties.SCORE_ERRORS, getData().getWrongTargets());
}
......@@ -309,6 +313,12 @@ public class ShootingRangeGame extends AbstractTablexiaGame<GameState> {
gameComplete();
}
@Override
protected void gameEnd() {
getStage().clear();
super.gameEnd();
}
/**
* Create scene with watch, carousel and background
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment