Skip to content

Commit

Permalink
User UI sprint4 (#183)
Browse files Browse the repository at this point in the history
* updated terrainfactory

* fixed texture load bug

* updated game timer

* Update RagnorakRacer.java

* updated game timer
  • Loading branch information
AdrianLSY authored Oct 19, 2021
1 parent aecf33c commit b98e87b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public class TerrainFactory {
private final OrthographicCamera camera;
private final TerrainOrientation orientation;

private static final int offset = 6;
private static final int width = 3;
private static final int laneCount = 4;
private static final int starPopulation = 20;

private Bridge rainbowBridge;

/**
Expand Down Expand Up @@ -142,16 +147,6 @@ private TerrainComponent createRainbowBridgeTerrain(
) {
GridPoint2 tilePixelSize = new GridPoint2(star1.getRegionWidth(), star1.getRegionHeight());

// Magic numbers, need to be set in a config file in future
// offset - y coordinate to start drawing the bridge
// width - width of a lane
// laneCount - amount of lanes to generate
// starPopulation - Number of stars to appear in the sky (based on probability, higher value = less stars)
int offset = 6;
int width = 3;
int laneCount = 4;
int starPopulation = 20;

// Fills the tile of the screen, also creates an instance of Bridge
TiledMap tiledMap = createRainbowBridgeTiles(
tilePixelSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class MainGameExitDisplay extends UIComponent {
private Label timerLabel;
public boolean exitx = false;
private long sleepTime = 1000;
private int displayTime = 120;
private int displayTime = 60;

// public MainGameExitDisplay(GdxGame game){
//// ServiceLocator.registerResourceService(new ResourceService());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class GameWinScreen extends ScreenAdapter {

private final GdxGame game;
private final Renderer renderer;
private static final String[] GameWinScreenTextures = {"images/Win-screen-2-transparent.png", "images/btn_restart1.png","images/btn_exit1.png", "images/FDS_btn_exit1.png"};
private static final String[] GameWinScreenTextures = {"images/Win-screen-2-transparent.png", "images/btn_restart1.png","images/btn_exit1.png", "images/FDS_btn_exit1.png", "images/ragnarok_background.png"};

private static final Sound winSound = Gdx.audio.newSound(Gdx.files.internal("sounds/win.ogg"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class RagnorakRacer extends ScreenAdapter {

public RagnorakRacer(GdxGame game) {
this.game = game;
this.gameTimer = 120000;
this.gameTimer = 60000;

logger.debug("Initialising main game screen services");
ServiceLocator.registerTimeSource(new GameTime());
Expand Down

0 comments on commit b98e87b

Please sign in to comment.