Skip to content

Commit

Permalink
make LoadMenu on world load
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisj42 committed May 5, 2017
1 parent 7d4ac8f commit 9fbabc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/minicraft/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class Game extends Canvas implements Runnable {
public int newscoreTime; // time you start with in score mode.

public static boolean pastDay1 = true; // used to prefent mob spawn on surface on day 1.
private static boolean readyToRenderGameplay = false;
public static boolean readyToRenderGameplay = false;

/// *** CONSTRUSTOR *** ///
public Game() {
Expand Down
3 changes: 2 additions & 1 deletion src/minicraft/screen/TitleMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ public class TitleMenu extends SelectMenu {

public TitleMenu() {
super(Arrays.asList(options), 11*8, 1, Color.get(0, 555), Color.get(0, 222));
folder = new File(location);
Game.readyToRenderGameplay = false;

folder = new File(location);
rand = random.nextInt(splashes.length);
loadUnlocks();
}
Expand Down
9 changes: 5 additions & 4 deletions src/minicraft/screen/WorldSelectMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class WorldSelectMenu extends Menu {

private static final String[] options = {"Load World", "New World"};
public static String worldname = "";
public static boolean loadWorld = false;
private boolean createWorld = false;

public static boolean loadworld = false;
private boolean createworld = false;
private int selected = 0; //index of action; load or create.
private int worldselected = 0; //index of selected world?

Expand Down Expand Up @@ -107,8 +107,9 @@ public void tick() {
//load the game
worldname = worldnames.get(worldselected);
Sound.test.play();
game.resetstartGame();
game.setMenu((Menu) null);
game.setMenu(new LoadingMenu());
//game.resetstartGame();
//game.setMenu((Menu) null);
} else {
if(Game.debug) System.out.println("delete mode");
//delete the world
Expand Down

0 comments on commit 9fbabc7

Please sign in to comment.