began working on game screen; changing entity system; clean up assets

This commit is contained in:
Harrison Deng 2018-02-04 21:16:36 -06:00
parent 1fbdefaecd
commit 7f51ca2c55
43 changed files with 102 additions and 78 deletions

View File

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 1.6 MiB

View File

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

View File

Before

Width:  |  Height:  |  Size: 3.8 MiB

After

Width:  |  Height:  |  Size: 3.8 MiB

View File

Before

Width:  |  Height:  |  Size: 6.4 MiB

After

Width:  |  Height:  |  Size: 6.4 MiB

View File

Before

Width:  |  Height:  |  Size: 15 MiB

After

Width:  |  Height:  |  Size: 15 MiB

View File

@ -38,11 +38,13 @@ import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
public class RhythmBullet extends Game {
public static final int WORLD_WIDTH = 64;
public static final int WORLD_HEIGHT = 48;
public static final int SPAWN_CIRCLE_RADIUS = 4;
public static float pixels_per_unit;
private boolean initComplete = false;
private boolean resizing;
private int screenWidth, screenHeight;
public static final int GAME_AREA_WIDTH = 64;
public static final int GAME_AREA_HEIGHT = 48;
public static final String VERSION = "(0.1)R1-PreAlpha";
private AssetManager assetManager = new AssetManager();
@ -165,6 +167,9 @@ public class RhythmBullet extends Game {
if (width != screenWidth || height != screenHeight) {
screenWidth = Gdx.graphics.getWidth();
screenHeight = Gdx.graphics.getHeight();
pixels_per_unit = screenHeight/WORLD_HEIGHT;
if (initComplete) {
Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height);
rRHandler.setResolution(width, height);
@ -238,7 +243,7 @@ public class RhythmBullet extends Game {
assetManager.load("beateffect.p", ParticleEffect.class);
assetManager.load("tpSelector.png", Texture.class);
assetManager.load("magic1.png", Texture.class);
assetManager.load("RhythmBulletBG.png", Texture.class);
assetManager.load("backgrounds/mainBG.png", Texture.class);
}
public void generateFonts(final int height) {

View File

@ -4,8 +4,6 @@ import java.security.InvalidParameterException;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.util.MusicManager;
public class AudioDataPackage {
private FloatArray bassPeaks;
private FloatArray mPeaks;

View File

@ -1,5 +1,5 @@
package zero1hd.rhythmbullet.util;
package zero1hd.rhythmbullet.audio;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Music.OnCompletionListener;

View File

@ -5,7 +5,7 @@ import java.util.concurrent.Executors;
import com.badlogic.gdx.utils.Disposable;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class AudioAnalyzer implements Disposable {
private ExecutorService exec;

View File

@ -4,7 +4,7 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.audio.AudioDataPackage;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class PeakDetectionRunnable implements Runnable {
boolean work = true, done;

View File

@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class PruneFluxRunnable implements Runnable {
boolean work = true;

View File

@ -5,7 +5,7 @@ import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.FloatArray;
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class SpectralFluxAnalysisRunnable implements Runnable {
boolean work = true;

View File

@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.audio.analyzer;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class ThresholdCalcRunnable implements Runnable {
boolean work = true;

View File

@ -11,7 +11,7 @@ import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Array;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class BasicVisualizer extends VisualizerCore {
private Pixmap pixmap;

View File

@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.utils.Disposable;
import edu.emory.mathcs.jtransforms.fft.FloatFFT_1D;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class VisualizerCore implements Disposable {
protected MusicManager mm;

View File

@ -1,5 +1,7 @@
package zero1hd.rhythmbullet.entity;
import java.security.InvalidParameterException;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
@ -22,7 +24,6 @@ public class Entity implements Poolable {
protected EntityManager ec;
protected boolean enemy;
protected boolean nonStnrd = false;
protected boolean move = true;
protected boolean dead;
@ -62,7 +63,14 @@ public class Entity implements Poolable {
}
public void init(float deg, float speed, int hp) {
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
sprite.setSize(sprite.getTexture().getWidth()/RhythmBullet.pixels_per_unit, sprite.getTexture().getHeight()/RhythmBullet.pixels_per_unit);
float r = RhythmBullet.SPAWN_CIRCLE_RADIUS - sprite.getWidth();
if (r < RhythmBullet.SPAWN_CIRCLE_RADIUS -1) {
throw new InvalidParameterException("Entity is too big! Calculated final distance from center: " + r);
}
sprite.setPosition(r*rotRatios.x, r*rotRatios.y);
updatePosition();
}
/**
@ -85,21 +93,19 @@ public class Entity implements Poolable {
}
public void calculate(float delta) {
if (!nonStnrd) {
if (coordinator != null) {
coordinator.coordinate(delta);
}
if (dead) {
ef.recycleEntity(this);
}
if (coordinator != null) {
coordinator.coordinate(delta);
}
if (dead) {
ef.recycleEntity(this);
}
if (angle >= 360f) {
angle -= 360f;
}
if (sprite.getX() > RhythmBullet.GAME_AREA_WIDTH || sprite.getY() > RhythmBullet.GAME_AREA_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) {
if (sprite.getX() > RhythmBullet.WORLD_WIDTH || sprite.getY() > RhythmBullet.WORLD_HEIGHT || sprite.getX() < 0-sprite.getWidth() || sprite.getX() < 0-sprite.getWidth()) {
dead = true;
}
@ -107,18 +113,16 @@ public class Entity implements Poolable {
}
public void draw(Batch batch) {
if (!nonStnrd) {
sprite.draw(batch);
}
sprite.draw(batch);
batch.setColor(Color.WHITE);
}
public void moveBy(float x, float y) {
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
sprite.setCenter(x, y);
sprite.setCenter(sprite.getX() + x, sprite.getY() + y);
}
public void updatePosition() {
rotRatios.set(MathUtils.cosDeg(angle), MathUtils.sinDeg(angle));
sprite.setOriginCenter();
sprite.setRotation(angle);
hitbox.setCenter(sprite.getOriginX(), sprite.getOriginY());

View File

@ -28,7 +28,7 @@ public class Laser extends Entity {
@Override
public void calculate(float delta) {
if (getY() > RhythmBullet.GAME_AREA_HEIGHT) {
if (getY() > RhythmBullet.WORLD_HEIGHT) {
dead = true;
}
super.calculate(delta);

View File

@ -19,12 +19,11 @@ public class PolyjetEntity extends Entity {
private float rate;
private int maxH;
public PolyjetEntity(AssetManager assets, float speed, float accel,int maxHealth, String jet) {
nonStnrd = true;
health = 100;
this.speed = speed;
this.accel = accel;
setSize(1.5f, 1.5f);
setPosition(RhythmBullet.GAME_AREA_WIDTH/2 - getWidth()/2, -4f);
setPosition(RhythmBullet.WORLD_WIDTH/2 - getWidth()/2, -4f);
maxH = maxHealth;
hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight());
polyjet = assets.get("polyjet-" + jet + ".png", Texture.class);

View File

@ -1,4 +1,4 @@
package zero1hd.rhythmbullet.desktop.audio.map;
package zero1hd.rhythmbullet.game;
import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package zero1hd.rhythmbullet.desktop.stages;
package zero1hd.rhythmbullet.game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputProcessor;
@ -8,7 +8,6 @@ import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.utils.Disposable;
import zero1hd.rhythmbullet.controls.KeyMap;
import zero1hd.rhythmbullet.desktop.audio.map.GamePlayMap;
import zero1hd.rhythmbullet.entity.CollisionDetector;
import zero1hd.rhythmbullet.entity.EntityManager;
import zero1hd.rhythmbullet.entity.ally.Laser;
@ -19,7 +18,6 @@ import zero1hd.rhythmbullet.util.ScoreManager;
public class GameController implements Disposable, InputProcessor {
public PolyjetEntity polyjet;
private GamePlayMap audioMap;
public CoordinatorManager cm;
public EntityManager em;
@ -58,14 +56,6 @@ public class GameController implements Disposable, InputProcessor {
}
}
public void setAudioMap(GamePlayMap audioMap) {
this.audioMap = audioMap;
}
public GamePlayMap getAudioMap() {
return audioMap;
}
@Override
public boolean keyDown(int keycode) {
if (keycode == KeyMap.left) {

View File

@ -1,10 +1,10 @@
package zero1hd.rhythmbullet.desktop.audio.map;
package zero1hd.rhythmbullet.game;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.entity.Entity;
import zero1hd.rhythmbullet.entity.EntityFrame;
import zero1hd.rhythmbullet.entity.coordinator.Coordinator;
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorFrame;
import zero1hd.rhythmbullet.util.MusicManager;
public class GamePlayMap {
private MusicManager musicData;

View File

@ -1,8 +1,7 @@
package zero1hd.rhythmbullet.desktop.audio.map;
package zero1hd.rhythmbullet.game;
import com.badlogic.gdx.utils.Array;
public class MapWindowData {
Array<EntitySpawnInfo> entityDatas;
public MapWindowData() {

View File

@ -7,7 +7,7 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.desktop.screens.LoadingScreen;
import zero1hd.rhythmbullet.desktop.screens.SplashScreen;
public class DesktopLauncher {
public static void main (String[] arg) {
@ -20,7 +20,7 @@ public class DesktopLauncher {
config.allowSoftwareMode = true;
config.useHDPI = true;
core = new RhythmBullet();
core.setInitialScreen(new LoadingScreen(core));
core.setInitialScreen(new SplashScreen(core));
new LwjglApplication(core, config);

View File

@ -24,7 +24,7 @@ import javazoom.jl.decoder.DecoderException;
import javazoom.jl.decoder.Header;
import javazoom.jl.decoder.MP3Decoder;
import javazoom.jl.decoder.OutputBuffer;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class Mp3Manager implements MusicManager {

View File

@ -9,8 +9,8 @@ import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Sort;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.util.FileHandleAlphabeticalComparator;
import zero1hd.rhythmbullet.util.MusicManager;
public class MusicList extends Observable {
private Array<FileHandle> musicList;

View File

@ -9,7 +9,7 @@ import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Music.OnCompletionListener;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class MusicListController extends Observable implements OnCompletionListener, Observer {
private MusicList musicList;

View File

@ -12,8 +12,8 @@ import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Music.OnCompletionListener;
import com.badlogic.gdx.files.FileHandle;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.audio.wavedecoder.WAVSampleReader;
import zero1hd.rhythmbullet.util.MusicManager;
public class WAVManager implements MusicManager {
private int readWindowSize = 1024;

View File

@ -2,13 +2,13 @@ package zero1hd.rhythmbullet.desktop.audio.map;
import org.apache.commons.math3.random.MersenneTwister;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.audio.AudioDataPackage;
import zero1hd.rhythmbullet.entity.EntityManager;
import zero1hd.rhythmbullet.entity.coordinator.CoordinatorManager;
import zero1hd.rhythmbullet.game.EntitySpawnInfo;
import zero1hd.rhythmbullet.game.GamePlayMap;
public class RhythmMapAlgorithm implements Runnable {

View File

@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class AudioGraph extends Actor {
private MusicManager audioData;

View File

@ -9,7 +9,7 @@ import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.utils.FloatArray;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class AudioGraphRelation extends Actor {
private MusicManager audioData;

View File

@ -11,7 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.utils.Align;
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
public class GraphicsOptions extends Table {
private Label resolutions, shaders;
@ -28,7 +28,7 @@ public class GraphicsOptions extends Table {
_1366x768;
public GraphicsOptions(final MainMenu mainMenu, Skin skin, final Preferences prefs) {
public GraphicsOptions(final MainMenuScreen mainMenu, Skin skin, final Preferences prefs) {
align(Align.center);
defaults().space(10f);
this.prefs = prefs;

View File

@ -17,8 +17,8 @@ import com.badlogic.gdx.utils.reflect.ClassReflection;
import com.badlogic.gdx.utils.reflect.Field;
import com.badlogic.gdx.utils.reflect.ReflectionException;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.audio.visualizer.BasicVisualizer;
import zero1hd.rhythmbullet.util.MusicManager;
public class Visualizer extends Widget implements Disposable {
private BasicVisualizer vis;

View File

@ -14,8 +14,8 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import zero1hd.rhythmbullet.audio.MusicInfo;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.audio.analyzer.AudioAnalyzer;
import zero1hd.rhythmbullet.util.MusicManager;
public class AnalysisPage extends Page {
private boolean confirmed;

View File

@ -14,12 +14,12 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import com.badlogic.gdx.utils.Align;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicControls;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.TitleBarVisualizer;
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
public class MainPage extends Page implements Observer {
private Label versionLabel;
@ -32,10 +32,10 @@ public class MainPage extends Page implements Observer {
private TextButton quitButton;
private MusicControls musicControls;
private MainMenu mMenu;
private MainMenuScreen mMenu;
private ScrollText scrollText;
public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenu mainMenu) {
public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenuScreen mainMenu) {
this.mlc = mlc;
this.mMenu = mainMenu;
titleBar = new TitleBarVisualizer(core.getAssetManager());

View File

@ -26,11 +26,11 @@ import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
import com.badlogic.gdx.utils.Array;
import zero1hd.rhythmbullet.audio.MusicInfo;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.MusicSelectable;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.ScrollText;
import zero1hd.rhythmbullet.util.MusicManager;
public class MusicSelectionPage extends Page implements Observer {
Preferences musicFileAnnotation;

View File

@ -10,14 +10,14 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import zero1hd.rhythmbullet.desktop.graphics.ui.components.GraphicsOptions;
import zero1hd.rhythmbullet.desktop.screens.MainMenu;
import zero1hd.rhythmbullet.desktop.screens.MainMenuScreen;
public class VideoOptionsPage extends Page {
private ScrollPane scrollPane;
private GraphicsOptions graphicsTable;
private TextButton backButton;
public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenu menu, AssetManager assets) {
public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenuScreen menu, AssetManager assets) {
graphicsTable = new GraphicsOptions(menu, skin, prefs);
scrollPane = new ScrollPane(graphicsTable, skin);
scrollPane.setFadeScrollBars(false);

View File

@ -10,7 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import zero1hd.rhythmbullet.audio.AudioDataPackage;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class BeatViewer extends Window {
Pixmap lights;

View File

@ -9,7 +9,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Slider;
import com.badlogic.gdx.scenes.scene2d.ui.Window;
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
import zero1hd.rhythmbullet.util.MusicManager;
import zero1hd.rhythmbullet.audio.MusicManager;
public class VolumeWindow extends Window {

View File

@ -0,0 +1,29 @@
package zero1hd.rhythmbullet.desktop.screens;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.ScreenAdapter;
import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.viewport.ExtendViewport;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.game.GameController;
public class GameScreen extends ScreenAdapter {
private AssetManager assets;
private SpriteBatch batch;
private ExtendViewport viewport;
private GameController gc;
public GameScreen(AssetManager assets, Preferences prefs) {
this.assets = assets;
batch = new SpriteBatch();
viewport = new ExtendViewport(RhythmBullet.WORLD_WIDTH, RhythmBullet.WORLD_HEIGHT);
}
@Override
public void render(float delta) {
super.render(delta);
}
}

View File

@ -20,6 +20,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.viewport.ScreenViewport;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.audio.MusicManager;
import zero1hd.rhythmbullet.desktop.audio.MusicInfoController;
import zero1hd.rhythmbullet.desktop.audio.MusicList;
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
@ -31,9 +32,8 @@ import zero1hd.rhythmbullet.desktop.graphics.ui.pages.MusicSelectionPage;
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.OptionsPage;
import zero1hd.rhythmbullet.desktop.graphics.ui.pages.VideoOptionsPage;
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
import zero1hd.rhythmbullet.util.MusicManager;
public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
public class MainMenuScreen extends ScreenAdapter implements AdvancedResizeScreen {
public Stage stage;
private Texture background;
private Vector3 cameraPosition;
@ -65,7 +65,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
private ScreenViewport screenViewport;
private boolean shaderLoaded;
public MainMenu(RhythmBullet core) {
public MainMenuScreen(RhythmBullet core) {
this.core = core;
stage = new Stage(new ScreenViewport());
cameraPosition = new Vector3(stage.getCamera().position);
@ -90,7 +90,7 @@ public class MainMenu extends ScreenAdapter implements AdvancedResizeScreen {
stage.addActor(mainPage);
//End main menu
background = core.getAssetManager().get("RhythmBulletBG.png", Texture.class);
background = core.getAssetManager().get("backgrounds/mainBG.png", Texture.class);
keybindPage = new KeybindOptionsPage(core.getDefaultSkin(), core.getAssetManager(), cameraPosition);
keybindPage.setPosition(-1f*Gdx.graphics.getWidth(), -1f*Gdx.graphics.getHeight());

View File

@ -13,14 +13,14 @@ import com.badlogic.gdx.utils.viewport.ScreenViewport;
import zero1hd.rhythmbullet.RhythmBullet;
import zero1hd.rhythmbullet.util.AdvancedResizeScreen;
public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen {
public class SplashScreen extends ScreenAdapter implements AdvancedResizeScreen {
private Stage stage;
private RhythmBullet core;
private Texture splash;
private Image zero1HD;
private boolean done;
public LoadingScreen(RhythmBullet core) {
public SplashScreen(RhythmBullet core) {
this.core = core;
}
@ -48,7 +48,7 @@ public class LoadingScreen extends ScreenAdapter implements AdvancedResizeScreen
if (!done) {
Gdx.app.debug("Loading Screen", "queue has all been loaded. Action is done playing.");
done = true;
core.setScreen(new MainMenu(core));
core.setScreen(new MainMenuScreen(core));
zero1HD.remove();
}
}