v2.5.0: improved new region splashes for portrait mobile
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 171 B |
Binary file not shown.
|
Before Width: | Height: | Size: 208 B |
Binary file not shown.
|
Before Width: | Height: | Size: 120 B |
Binary file not shown.
|
Before Width: | Height: | Size: 475 B |
Binary file not shown.
|
Before Width: | Height: | Size: 232 B |
@@ -86,12 +86,6 @@ public class Assets {
|
|||||||
|
|
||||||
public static final String SURFACE = "interfaces/surface.png";
|
public static final String SURFACE = "interfaces/surface.png";
|
||||||
|
|
||||||
public static final String LOADING_SEWERS = "interfaces/loading_sewers.png";
|
|
||||||
public static final String LOADING_PRISON = "interfaces/loading_prison.png";
|
|
||||||
public static final String LOADING_CAVES = "interfaces/loading_caves.png";
|
|
||||||
public static final String LOADING_CITY = "interfaces/loading_city.png";
|
|
||||||
public static final String LOADING_HALLS = "interfaces/loading_halls.png";
|
|
||||||
|
|
||||||
public static final String BUFFS_SMALL = "interfaces/buffs.png";
|
public static final String BUFFS_SMALL = "interfaces/buffs.png";
|
||||||
public static final String BUFFS_LARGE = "interfaces/large_buffs.png";
|
public static final String BUFFS_LARGE = "interfaces/large_buffs.png";
|
||||||
|
|
||||||
|
|||||||
@@ -217,12 +217,8 @@ public class Dungeon {
|
|||||||
public static String customSeedText = "";
|
public static String customSeedText = "";
|
||||||
public static long seed;
|
public static long seed;
|
||||||
|
|
||||||
public static void init() {
|
//we initialize the seed separately so that things like interlevelscene can access it early
|
||||||
|
public static void initSeed(){
|
||||||
initialVersion = version = Game.versionCode;
|
|
||||||
challenges = SPDSettings.challenges();
|
|
||||||
mobsToChampion = -1;
|
|
||||||
|
|
||||||
if (daily) {
|
if (daily) {
|
||||||
//Ensures that daily seeds are not in the range of user-enterable seeds
|
//Ensures that daily seeds are not in the range of user-enterable seeds
|
||||||
seed = SPDSettings.lastDaily() + DungeonSeed.TOTAL_SEEDS;
|
seed = SPDSettings.lastDaily() + DungeonSeed.TOTAL_SEEDS;
|
||||||
@@ -236,6 +232,13 @@ public class Dungeon {
|
|||||||
customSeedText = "";
|
customSeedText = "";
|
||||||
seed = DungeonSeed.randomSeed();
|
seed = DungeonSeed.randomSeed();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void init() {
|
||||||
|
|
||||||
|
initialVersion = version = Game.versionCode;
|
||||||
|
challenges = SPDSettings.challenges();
|
||||||
|
mobsToChampion = -1;
|
||||||
|
|
||||||
Actor.clear();
|
Actor.clear();
|
||||||
Actor.resetNextID();
|
Actor.resetNextID();
|
||||||
|
|||||||
+2
@@ -136,6 +136,7 @@ public class HeroSelectScene extends PixelScene {
|
|||||||
|
|
||||||
Dungeon.hero = null;
|
Dungeon.hero = null;
|
||||||
Dungeon.daily = Dungeon.dailyReplay = false;
|
Dungeon.daily = Dungeon.dailyReplay = false;
|
||||||
|
Dungeon.initSeed();
|
||||||
ActionIndicator.clearAction();
|
ActionIndicator.clearAction();
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
||||||
|
|
||||||
@@ -675,6 +676,7 @@ public class HeroSelectScene extends PixelScene {
|
|||||||
|
|
||||||
Dungeon.hero = null;
|
Dungeon.hero = null;
|
||||||
Dungeon.daily = true;
|
Dungeon.daily = true;
|
||||||
|
Dungeon.initSeed();
|
||||||
ActionIndicator.clearAction();
|
ActionIndicator.clearAction();
|
||||||
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
InterlevelScene.mode = InterlevelScene.Mode.DESCEND;
|
||||||
|
|
||||||
|
|||||||
+59
-8
@@ -46,6 +46,7 @@ import com.watabou.noosa.Game;
|
|||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.utils.BArray;
|
import com.watabou.utils.BArray;
|
||||||
import com.watabou.utils.DeviceCompat;
|
import com.watabou.utils.DeviceCompat;
|
||||||
|
import com.watabou.utils.GameMath;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
@@ -99,14 +100,16 @@ public class InterlevelScene extends PixelScene {
|
|||||||
|
|
||||||
String loadingAsset;
|
String loadingAsset;
|
||||||
int loadingDepth;
|
int loadingDepth;
|
||||||
final float scrollSpeed;
|
|
||||||
fadeTime = NORM_FADE;
|
fadeTime = NORM_FADE;
|
||||||
|
|
||||||
|
long seed = Dungeon.seed;
|
||||||
switch (mode){
|
switch (mode){
|
||||||
default:
|
default:
|
||||||
loadingDepth = Dungeon.depth;
|
loadingDepth = Dungeon.depth;
|
||||||
break;
|
break;
|
||||||
case CONTINUE:
|
case CONTINUE:
|
||||||
loadingDepth = GamesInProgress.check(GamesInProgress.curSlot).depth;
|
loadingDepth = GamesInProgress.check(GamesInProgress.curSlot).depth;
|
||||||
|
seed = GamesInProgress.check(GamesInProgress.curSlot).seed;
|
||||||
break;
|
break;
|
||||||
case DESCEND:
|
case DESCEND:
|
||||||
if (Dungeon.hero == null){
|
if (Dungeon.hero == null){
|
||||||
@@ -143,11 +146,54 @@ public class InterlevelScene extends PixelScene {
|
|||||||
lastRegion = region;
|
lastRegion = region;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastRegion == 1) loadingAsset = Assets.Splashes.SEWERS;
|
int loadingCenter = 400;
|
||||||
else if (lastRegion == 2) loadingAsset = Assets.Splashes.PRISON;
|
|
||||||
else if (lastRegion == 3) loadingAsset = Assets.Splashes.CAVES;
|
//for portrait users, each run the splashes change what details they focus on
|
||||||
else if (lastRegion == 4) loadingAsset = Assets.Splashes.CITY;
|
//TOD should these be uniform, or should some be more common?
|
||||||
else loadingAsset = Assets.Splashes.HALLS;
|
Random.pushGenerator(seed+lastRegion);
|
||||||
|
switch (lastRegion){
|
||||||
|
case 1:
|
||||||
|
loadingAsset = Assets.Splashes.SEWERS;
|
||||||
|
switch (Random.Int(3)){
|
||||||
|
case 0: loadingCenter = 180; break; //focus on rats and left side
|
||||||
|
case 1: loadingCenter = 485; break; //focus on center pipe and door
|
||||||
|
case 2: loadingCenter = 700; break; //focus on right pipe
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
loadingAsset = Assets.Splashes.PRISON;
|
||||||
|
switch (Random.Int(3)){
|
||||||
|
case 0: loadingCenter = 190; break; //focus on left skeleton
|
||||||
|
case 1: loadingCenter = 402; break; //focus on center arch
|
||||||
|
case 2: loadingCenter = 650; break; //focus on right stairs
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
loadingAsset = Assets.Splashes.CAVES;
|
||||||
|
switch (Random.Int(3)){
|
||||||
|
case 0: loadingCenter = 120; break; //focus on far-left mining machinery
|
||||||
|
case 1: loadingCenter = 340; break; //focus on center gnoll groups
|
||||||
|
case 2: loadingCenter = 625; break; //focus on right gnoll
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
loadingAsset = Assets.Splashes.CITY;
|
||||||
|
switch (Random.Int(3)){
|
||||||
|
case 0: loadingCenter = 275; break; //focus on left bookcases
|
||||||
|
case 1: loadingCenter = 460; break; //focus on center pathway
|
||||||
|
case 2: loadingCenter = 625; break; //focus on right bookcases
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 5: default:
|
||||||
|
loadingAsset = Assets.Splashes.HALLS;
|
||||||
|
switch (Random.Int(3)){
|
||||||
|
case 0: loadingCenter = 145; break; //focus on left arches
|
||||||
|
case 1: loadingCenter = 400; break; //focus on ripper demon
|
||||||
|
case 2: loadingCenter = 615; break; //focus on right arches
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
Random.popGenerator();
|
||||||
|
|
||||||
if (DeviceCompat.isDebug()){
|
if (DeviceCompat.isDebug()){
|
||||||
fadeTime = 0f;
|
fadeTime = 0f;
|
||||||
@@ -156,7 +202,12 @@ public class InterlevelScene extends PixelScene {
|
|||||||
Image background = new Image(loadingAsset);
|
Image background = new Image(loadingAsset);
|
||||||
background.scale.set(Camera.main.height/background.height);
|
background.scale.set(Camera.main.height/background.height);
|
||||||
|
|
||||||
background.x = (Camera.main.width - background.width())/2f;
|
if (Camera.main.width >= background.width()){
|
||||||
|
background.x = (Camera.main.width - background.width())/2f;
|
||||||
|
} else {
|
||||||
|
background.x = Camera.main.width/2f - loadingCenter*background.scale.x;
|
||||||
|
background.x = GameMath.gate(Camera.main.width - background.width(), background.x, 0);
|
||||||
|
}
|
||||||
background.y = (Camera.main.height - background.height())/2f;
|
background.y = (Camera.main.height - background.height())/2f;
|
||||||
PixelScene.align(background);
|
PixelScene.align(background);
|
||||||
add(background);
|
add(background);
|
||||||
@@ -172,7 +223,7 @@ public class InterlevelScene extends PixelScene {
|
|||||||
fadeRight.x = background.x + background.width() + 2;
|
fadeRight.x = background.x + background.width() + 2;
|
||||||
fadeRight.y = background.y + background.height();
|
fadeRight.y = background.y + background.height();
|
||||||
fadeRight.angle = 180;
|
fadeRight.angle = 180;
|
||||||
fadeRight.visible = background.x + background.width() < Camera.main.width;
|
fadeRight.visible = fadeLeft.visible;
|
||||||
add(fadeRight);
|
add(fadeRight);
|
||||||
|
|
||||||
Image im = new Image(TextureCache.createGradient(0xAA000000, 0xBB000000, 0xCC000000, 0xDD000000, 0xFF000000)){
|
Image im = new Image(TextureCache.createGradient(0xAA000000, 0xBB000000, 0xCC000000, 0xDD000000, 0xFF000000)){
|
||||||
|
|||||||
Reference in New Issue
Block a user