Skip to content
Snippets Groups Projects
Commit c37288dc authored by Luboš Horáček's avatar Luboš Horáček
Browse files

Fixed scaling and result stats

parent b26aaa79
Branches
Tags
No related merge requests found
......@@ -8,3 +8,4 @@ game_shootingrange_loadingtext_1=Pozorně sleduj kytku v\u00A0pravém horním ro
game_shootingrange_loadingtext_2=Kliknutí na bednu s\u00A0hvězdičkou ti\u00A0strefování kytek ulehčí, kliknutí na\u00A0bednu s\u00A0lebkou naopak ztíží.
game_shootingrange_plus=+5
game_shootingrange_minus=-5
game_shootingrange_stats=Tvoje skóre: [BLACK]{0}[]
\ No newline at end of file
......@@ -8,3 +8,4 @@ game_shootingrange_loadingtext_1=Verfolge aufmerksam die Blume im\u00A0oberen re
game_shootingrange_loadingtext_2=Mit einem Klick auf die Kiste mit\u00A0Stern lassen sich die\u00A0Blumen leichter treffen, mit einem Klick auf\u00A0 die Kiste mit\u00A0Schädel schwieriger.
game_shootingrange_plus=+5
game_shootingrange_minus=-5
game_shootingrange_stats=Deine Punktzahl: [BLACK]{0}[]
......@@ -8,5 +8,5 @@ game_shootingrange_loadingtext_1=Pozorne sleduj kvet v pravom hornom rohu. Na st
game_shootingrange_loadingtext_2=Kliknutie na bedňu s hviezdičkou ti triafanie kvetov uľahčí, kliknutie na bedňu s lebkou naopak sťaží.
game_shootingrange_plus=+5
game_shootingrange_minus=-5
game_shootingrange_stats=Tvoje skóre: [BLACK]{0}[]
......@@ -49,4 +49,6 @@ public class Properties {
"game_shootingrange_result_1",
"game_shootingrange_result_2",
"game_shootingrange_result_3"};
static final String RESULT_TEXT_SUMMARY = "game_shootingrange_stats";
}
......@@ -7,6 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -249,7 +250,6 @@ public class ShootingRangeGame extends AbstractTablexiaGame<GameState> {
*/
private void initScene() {
getStage().addActor(scene = new Scene(gfxLibrary));
scene.setBounds(0, getStage().getCamera().position.y - getStage().getHeight() / 2, getStage().getWidth(), getStage().getHeight()); // scaling viewport camera y-position adjustment
getStage().addActor(watch = new Watch(gfxLibrary));
watch.setScale(0.4f);
getStage().addActor(carousel = new Carousel(gfxLibrary));
......@@ -269,6 +269,7 @@ public class ShootingRangeGame extends AbstractTablexiaGame<GameState> {
@Override
protected void screenResized(int width, int height) {
super.screenResized(width, height);
scene.setBounds(0, getStage().getCamera().position.y - getStage().getHeight() / 2, getStage().getWidth(), getStage().getHeight()); // scaling viewport camera y-position adjustment
watch.setPosition(0, getStage().getCamera().position.y - getStage().getHeight() / 2);
carousel.setPosition(getStage().getWidth() - (carousel.getWidth() / 2), getStage().getCamera().position.y + (getStage().getHeight() / 2) - (carousel.getHeight() / 2));
score.setPosition(getStage().getWidth() - score.getWidth() - 50, 25);
......@@ -276,7 +277,8 @@ public class ShootingRangeGame extends AbstractTablexiaGame<GameState> {
@Override
protected List<SummaryMessage> getSummaryMessageForGameResult(Game game) {
return null;
return Arrays.asList(new SummaryMessage(SummaryImage.STATS, getFormattedText(Properties.RESULT_TEXT_SUMMARY, game.getGameScore(Properties.SCORE_TOTAL, "0"))));
}
@Override
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment