summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-11-21 14:44:16 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2015-11-21 14:44:16 +0100
commit92f44441e0f38a9da2c934d778f2be1000c25856 (patch)
tree6313112264936c004a5a5cb0bbdb262a16b5ab95 /core/src
parent5ec3bec813d29e2d669fd7579111ec731ce55b09 (diff)
downloadRustAndDust-92f44441e0f38a9da2c934d778f2be1000c25856.zip
RustAndDust-92f44441e0f38a9da2c934d778f2be1000c25856.tar.gz
MenuScreen: use map_00
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/rustanddust/RustAndDust.java4
-rw-r--r--core/src/ch/asynk/rustanddust/screens/MenuScreen.java12
2 files changed, 9 insertions, 7 deletions
diff --git a/core/src/ch/asynk/rustanddust/RustAndDust.java b/core/src/ch/asynk/rustanddust/RustAndDust.java
index 3e4d70d..c36c856 100644
--- a/core/src/ch/asynk/rustanddust/RustAndDust.java
+++ b/core/src/ch/asynk/rustanddust/RustAndDust.java
@@ -163,7 +163,7 @@ public class RustAndDust extends Game
private void loadMenuAssets()
{
- manager.load("data/map_a.png", Texture.class);
+ manager.load("data/map_00.png", Texture.class);
manager.load("data/menu.atlas", TextureAtlas.class);
manager.finishLoading();
menuAtlas = manager.get("data/menu.atlas", TextureAtlas.class);
@@ -171,7 +171,7 @@ public class RustAndDust extends Game
private void unloadMenuAssets()
{
- manager.unload("data/map_a.png");
+ manager.unload("data/map_00.png");
manager.unload("data/menu.atlas");
}
diff --git a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
index 8997eb4..d9d2221 100644
--- a/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
+++ b/core/src/ch/asynk/rustanddust/screens/MenuScreen.java
@@ -32,8 +32,9 @@ public class MenuScreen implements Screen
private float delay = 0.0f;
private float dx;
private float dy;
- private int[] xPath = { 369, 558, 747, 936, 1125, 1030, 936, 1125, 1314, 1408, 1597};
- private int[] yPath = { 565, 565, 565, 565, 565, 729, 892, 892, 892, 1056, 1056};
+ private int[] xPath = { 907, 812, 908, 1098, 1288, 1384, 1481, 1578};
+ private int[] yPath = { 491, 653, 818, 818, 818, 984, 1150, 1316};
+
private int n = xPath.length;
private boolean ready;
@@ -68,7 +69,7 @@ public class MenuScreen implements Screen
this.gameAssetsLoading = false;
- this.bg = game.manager.get("data/map_a.png", Texture.class);
+ this.bg = game.manager.get("data/map_00.png", Texture.class);
this.unit = new Sprite(game.menuAtlas.findRegion("unit"));
this.move = new Sprite(game.menuAtlas.findRegion("move"));
@@ -156,8 +157,9 @@ public class MenuScreen implements Screen
}
percent = Interpolation.linear.apply(percent, game.manager.getProgress(), 0.1f);
- int idx = (int) (percent * 10);
- float fraction = ((percent * 100 ) % 10 / 10);
+ float p = (percent * (xPath.length - 1));
+ int idx = (int) p;
+ float fraction = (p - idx);
x = (xPath[idx] + ((xPath[idx + 1] - xPath[idx]) * fraction));
y = (yPath[idx] + ((yPath[idx + 1] - yPath[idx]) * fraction));
}