edited the title png
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.9 KiB |
@ -1,7 +1,7 @@
|
|||||||
package zero1hd.rhythmbullet;
|
package zero1hd.rhythmbullet;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||||
@ -11,6 +11,6 @@ public class AndroidLauncher extends AndroidApplication {
|
|||||||
protected void onCreate (Bundle savedInstanceState) {
|
protected void onCreate (Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
AndroidApplicationConfiguration config = new AndroidApplicationConfiguration();
|
||||||
initialize(new Main(), config);
|
initialize(new RhythmBullet(), config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ import zero1hd.rhythmbullet.screens.MainMenu;
|
|||||||
import zero1hd.rhythmbullet.util.GenericFileTypeHandler;
|
import zero1hd.rhythmbullet.util.GenericFileTypeHandler;
|
||||||
import zero1hd.rhythmbullet.util.RoundingResolutionHandler;
|
import zero1hd.rhythmbullet.util.RoundingResolutionHandler;
|
||||||
|
|
||||||
public class Main extends Game {
|
public class RhythmBullet extends Game {
|
||||||
private boolean initComplete = false;
|
private boolean initComplete = false;
|
||||||
|
|
||||||
public static final int GAME_AREA_WIDTH = 64;
|
public static final int GAME_AREA_WIDTH = 64;
|
@ -5,7 +5,7 @@ import org.apache.commons.math3.random.MersenneTwister;
|
|||||||
import com.badlogic.gdx.math.MathUtils;
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
import com.badlogic.gdx.utils.FloatArray;
|
import com.badlogic.gdx.utils.FloatArray;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
import zero1hd.rhythmbullet.util.MiniEvents;
|
import zero1hd.rhythmbullet.util.MiniEvents;
|
||||||
@ -65,14 +65,14 @@ public class RhythmMapAlgorithm implements Runnable {
|
|||||||
//If bass peak is greater than the bass peak average, then:
|
//If bass peak is greater than the bass peak average, then:
|
||||||
int normalIndexPos = map.setIndex((int) (map.getIndex() - windowPerSecond*1.5f));
|
int normalIndexPos = map.setIndex((int) (map.getIndex() - windowPerSecond*1.5f));
|
||||||
float waitTime = 1.5f;
|
float waitTime = 1.5f;
|
||||||
float endRadius = (bassPeaks.get(index)/bassMax)*(Main.GAME_AREA_HEIGHT/4f);
|
float endRadius = (bassPeaks.get(index)/bassMax)*(RhythmBullet.GAME_AREA_HEIGHT/4f);
|
||||||
|
|
||||||
esi = map.addEntity(EntityIndex.VOID_CIRCLE);
|
esi = map.addEntity(EntityIndex.VOID_CIRCLE);
|
||||||
esi.parameters.put("warningTime", waitTime);
|
esi.parameters.put("warningTime", waitTime);
|
||||||
esi.parameters.put("endRadius", endRadius);
|
esi.parameters.put("endRadius", endRadius);
|
||||||
esi.parameters.put("growthRate", endRadius/(avgSPB*0.8f));
|
esi.parameters.put("growthRate", endRadius/(avgSPB*0.8f));
|
||||||
esi.parameters.put("x", rand.nextFloat()*Main.GAME_AREA_WIDTH);
|
esi.parameters.put("x", rand.nextFloat()*RhythmBullet.GAME_AREA_WIDTH);
|
||||||
esi.parameters.put("y", rand.nextFloat()*Main.GAME_AREA_HEIGHT);
|
esi.parameters.put("y", rand.nextFloat()*RhythmBullet.GAME_AREA_HEIGHT);
|
||||||
|
|
||||||
map.setIndex(normalIndexPos);
|
map.setIndex(normalIndexPos);
|
||||||
} else {
|
} else {
|
||||||
@ -83,20 +83,20 @@ public class RhythmMapAlgorithm implements Runnable {
|
|||||||
if (umPeaks.get(index) != 0) {
|
if (umPeaks.get(index) != 0) {
|
||||||
if (umPeaks.get(index) >= avgUM) {
|
if (umPeaks.get(index) >= avgUM) {
|
||||||
//If upper midrange peaks are greater than average, the:
|
//If upper midrange peaks are greater than average, the:
|
||||||
int spawnLocations = (Main.GAME_AREA_WIDTH-8)/8;
|
int spawnLocations = (RhythmBullet.GAME_AREA_WIDTH-8)/8;
|
||||||
|
|
||||||
esi = map.addEntity(EntityIndex.BAR);
|
esi = map.addEntity(EntityIndex.BAR);
|
||||||
esi.parameters.put("x", (float) (MathUtils.round(rand.nextFloat()*spawnLocations)*8));
|
esi.parameters.put("x", (float) (MathUtils.round(rand.nextFloat()*spawnLocations)*8));
|
||||||
esi.parameters.put("rate", (8f/avgSPB)*speedMod);
|
esi.parameters.put("rate", (8f/avgSPB)*speedMod);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
float xSpawnLocation = (rand.nextFloat()*(Main.GAME_AREA_WIDTH-2))+1;
|
float xSpawnLocation = (rand.nextFloat()*(RhythmBullet.GAME_AREA_WIDTH-2))+1;
|
||||||
|
|
||||||
esi = map.addEntity(EntityIndex.PELLET);
|
esi = map.addEntity(EntityIndex.PELLET);
|
||||||
esi.parameters.put("x", xSpawnLocation);
|
esi.parameters.put("x", xSpawnLocation);
|
||||||
esi.parameters.put("y", Main.GAME_AREA_HEIGHT-0.25f);
|
esi.parameters.put("y", RhythmBullet.GAME_AREA_HEIGHT-0.25f);
|
||||||
esi.parameters.put("angle", 140*rand.nextFloat()+200f);
|
esi.parameters.put("angle", 140*rand.nextFloat()+200f);
|
||||||
esi.parameters.put("speed", (Main.GAME_AREA_HEIGHT/4f)/avgSPB);
|
esi.parameters.put("speed", (RhythmBullet.GAME_AREA_HEIGHT/4f)/avgSPB);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.Preferences;
|
|||||||
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
|
||||||
public class KeyMap {
|
public class KeyMap {
|
||||||
TextureAtlas keyTextures;
|
TextureAtlas keyTextures;
|
||||||
@ -61,7 +61,7 @@ public class KeyMap {
|
|||||||
public static int accelerate;
|
public static int accelerate;
|
||||||
|
|
||||||
|
|
||||||
public KeyMap(Main core) {
|
public KeyMap(RhythmBullet core) {
|
||||||
keyTextures = core.getAssetManager().get("keyboard.atlas", TextureAtlas.class);
|
keyTextures = core.getAssetManager().get("keyboard.atlas", TextureAtlas.class);
|
||||||
|
|
||||||
setKeys(Gdx.app.getPreferences("PolyJet_Controls"));
|
setKeys(Gdx.app.getPreferences("PolyJet_Controls"));
|
||||||
|
@ -10,7 +10,7 @@ import com.badlogic.gdx.graphics.g2d.ParticleEffectPool;
|
|||||||
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect;
|
import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect;
|
||||||
import com.badlogic.gdx.utils.Array;
|
import com.badlogic.gdx.utils.Array;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
|
||||||
public class CollisionDetector {
|
public class CollisionDetector {
|
||||||
Array<Entity> enemies;
|
Array<Entity> enemies;
|
||||||
@ -46,7 +46,7 @@ public class CollisionDetector {
|
|||||||
|
|
||||||
//Play FX;
|
//Play FX;
|
||||||
if (ally.playCollideSFX() && enemy.playCollideSFX()) {
|
if (ally.playCollideSFX() && enemy.playCollideSFX()) {
|
||||||
explosionSFX.play(prefs.getFloat("fx vol")/100f, 1f, (enemy.getX()/Main.GAME_AREA_WIDTH));
|
explosionSFX.play(prefs.getFloat("fx vol")/100f, 1f, (enemy.getX()/RhythmBullet.GAME_AREA_WIDTH));
|
||||||
}
|
}
|
||||||
if (ally.playCollidePFX() && enemy.playCollidePFX()) {
|
if (ally.playCollidePFX() && enemy.playCollidePFX()) {
|
||||||
PooledEffect currentPFX;
|
PooledEffect currentPFX;
|
||||||
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.Texture;
|
|||||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public class Laser extends Entity {
|
|||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
toBack();
|
toBack();
|
||||||
if (getY() > Main.GAME_AREA_HEIGHT) {
|
if (getY() > RhythmBullet.GAME_AREA_HEIGHT) {
|
||||||
dead = true;
|
dead = true;
|
||||||
}
|
}
|
||||||
super.act(delta);
|
super.act(delta);
|
||||||
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.g2d.ParticleEffect;
|
|||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
|
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ public class PolyJetEntity extends Entity {
|
|||||||
this.speed = speed;
|
this.speed = speed;
|
||||||
this.accel = accel;
|
this.accel = accel;
|
||||||
setSize(1.5f, 1.5f);
|
setSize(1.5f, 1.5f);
|
||||||
setPosition(Main.GAME_AREA_WIDTH/2 - getWidth()/2, -4f);
|
setPosition(RhythmBullet.GAME_AREA_WIDTH/2 - getWidth()/2, -4f);
|
||||||
|
|
||||||
hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight());
|
hitbox = new Rectangle(getX(), getY(), getWidth(), getHeight());
|
||||||
polyjet = assets.get("polyjet-" + jet + ".png", Texture.class);
|
polyjet = assets.get("polyjet-" + jet + ".png", Texture.class);
|
||||||
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
|
|||||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -22,14 +22,14 @@ public class Bar extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void init(float x, float rate) {
|
public void init(float x, float rate) {
|
||||||
setPosition(x, Main.GAME_AREA_HEIGHT);
|
setPosition(x, RhythmBullet.GAME_AREA_HEIGHT);
|
||||||
speed = rate;
|
speed = rate;
|
||||||
angle = 270;
|
angle = 270;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(HashMap<String, Float> params) {
|
public void init(HashMap<String, Float> params) {
|
||||||
setPosition(params.get("x"), Main.GAME_AREA_HEIGHT);
|
setPosition(params.get("x"), RhythmBullet.GAME_AREA_HEIGHT);
|
||||||
speed = params.get("rate");
|
speed = params.get("rate");
|
||||||
angle = 270;
|
angle = 270;
|
||||||
super.init(params);
|
super.init(params);
|
||||||
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.g2d.Batch;
|
|||||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ public class Flake extends Entity {
|
|||||||
System.out.println("Sprite Pos: " + shards[i].getHitZone());
|
System.out.println("Sprite Pos: " + shards[i].getHitZone());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getX() > Main.GAME_AREA_WIDTH || getY() > Main.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
if (getX() > RhythmBullet.GAME_AREA_WIDTH || getY() > RhythmBullet.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
||||||
timer = 0;
|
timer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.graphics.Texture;
|
|||||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||||
import com.badlogic.gdx.utils.Pool.Poolable;
|
import com.badlogic.gdx.utils.Pool.Poolable;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ public class Pellet extends Entity implements Poolable {
|
|||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
super.act(delta);
|
super.act(delta);
|
||||||
|
|
||||||
if (getX() > Main.GAME_AREA_WIDTH || getY() > Main.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
if (getX() > RhythmBullet.GAME_AREA_WIDTH || getY() > RhythmBullet.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
||||||
dead = true;
|
dead = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.graphics.g2d.Batch;
|
|||||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||||
import com.badlogic.gdx.math.Rectangle;
|
import com.badlogic.gdx.math.Rectangle;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.entity.Entity;
|
import zero1hd.rhythmbullet.entity.Entity;
|
||||||
import zero1hd.rhythmbullet.entity.EntityIndex;
|
import zero1hd.rhythmbullet.entity.EntityIndex;
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ public class Shard extends Entity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
if (getX() > Main.GAME_AREA_WIDTH || getY() > Main.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
if (getX() > RhythmBullet.GAME_AREA_WIDTH || getY() > RhythmBullet.GAME_AREA_HEIGHT || getX() < 0-getWidth() || getY() < 0-getHeight()) {
|
||||||
hp = 0;
|
hp = 0;
|
||||||
}
|
}
|
||||||
super.act(delta);
|
super.act(delta);
|
||||||
|
@ -6,7 +6,7 @@ import com.badlogic.gdx.Preferences;
|
|||||||
import com.badlogic.gdx.ScreenAdapter;
|
import com.badlogic.gdx.ScreenAdapter;
|
||||||
import com.badlogic.gdx.graphics.GL20;
|
import com.badlogic.gdx.graphics.GL20;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.ui.stages.CreativeHUD;
|
import zero1hd.rhythmbullet.ui.stages.CreativeHUD;
|
||||||
import zero1hd.rhythmbullet.ui.stages.GamePlayArea;
|
import zero1hd.rhythmbullet.ui.stages.GamePlayArea;
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ public class CreativeDebugScreen extends ScreenAdapter {
|
|||||||
|
|
||||||
Preferences prefs;
|
Preferences prefs;
|
||||||
|
|
||||||
public CreativeDebugScreen(Main core, MainMenu mainMenu) {
|
public CreativeDebugScreen(RhythmBullet core, MainMenu mainMenu) {
|
||||||
gamePlayArea = new GamePlayArea(core.getAssetManager(), core.getPrefs());
|
gamePlayArea = new GamePlayArea(core.getAssetManager(), core.getPrefs());
|
||||||
creative = new CreativeHUD(core, mainMenu, gamePlayArea);
|
creative = new CreativeHUD(core, mainMenu, gamePlayArea);
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.AudioData;
|
import zero1hd.rhythmbullet.audio.AudioData;
|
||||||
import zero1hd.rhythmbullet.audio.map.GamePlayMap;
|
import zero1hd.rhythmbullet.audio.map.GamePlayMap;
|
||||||
import zero1hd.rhythmbullet.ui.stages.GameHUD;
|
import zero1hd.rhythmbullet.ui.stages.GameHUD;
|
||||||
@ -23,7 +23,7 @@ public class GameScreen extends ScreenAdapter {
|
|||||||
|
|
||||||
public InputMultiplexer inputs;
|
public InputMultiplexer inputs;
|
||||||
|
|
||||||
public Main core;
|
public RhythmBullet core;
|
||||||
|
|
||||||
private AudioData music;
|
private AudioData music;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ public class GameScreen extends ScreenAdapter {
|
|||||||
private ShaderProgram bgShader;
|
private ShaderProgram bgShader;
|
||||||
private Texture background;
|
private Texture background;
|
||||||
|
|
||||||
public GameScreen(Main polyJet, GamePlayMap gpm) {
|
public GameScreen(RhythmBullet polyJet, GamePlayMap gpm) {
|
||||||
core = polyJet;
|
core = polyJet;
|
||||||
|
|
||||||
// Overlay stuff
|
// Overlay stuff
|
||||||
|
@ -12,17 +12,17 @@ import com.badlogic.gdx.scenes.scene2d.actions.Actions;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.util.TransitionAdapter;
|
import zero1hd.rhythmbullet.util.TransitionAdapter;
|
||||||
|
|
||||||
public class LoadingScreen extends ScreenAdapter {
|
public class LoadingScreen extends ScreenAdapter {
|
||||||
private Stage stage;
|
private Stage stage;
|
||||||
Main core;
|
RhythmBullet core;
|
||||||
Image zero1HD;
|
Image zero1HD;
|
||||||
Screen gotoScreen;
|
Screen gotoScreen;
|
||||||
boolean reInit;
|
boolean reInit;
|
||||||
|
|
||||||
public LoadingScreen(Main core, Screen gotoScreen, boolean reInit, boolean timer) {
|
public LoadingScreen(RhythmBullet core, Screen gotoScreen, boolean reInit, boolean timer) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
this.gotoScreen = gotoScreen;
|
this.gotoScreen = gotoScreen;
|
||||||
this.reInit = reInit;
|
this.reInit = reInit;
|
||||||
|
@ -12,7 +12,7 @@ import com.badlogic.gdx.scenes.scene2d.Stage;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.ui.pages.CreditsPage;
|
import zero1hd.rhythmbullet.ui.pages.CreditsPage;
|
||||||
import zero1hd.rhythmbullet.ui.pages.MainPage;
|
import zero1hd.rhythmbullet.ui.pages.MainPage;
|
||||||
import zero1hd.rhythmbullet.ui.pages.MoreOptionsPage;
|
import zero1hd.rhythmbullet.ui.pages.MoreOptionsPage;
|
||||||
@ -30,9 +30,9 @@ public class MainMenu extends ScreenAdapter implements TransitionAdapter {
|
|||||||
private CreditsPage creditsPage;
|
private CreditsPage creditsPage;
|
||||||
private MoreOptionsPage moreOptionsPage;
|
private MoreOptionsPage moreOptionsPage;
|
||||||
|
|
||||||
private Main core;
|
private RhythmBullet core;
|
||||||
|
|
||||||
public MainMenu(final Main core) {
|
public MainMenu(final RhythmBullet core) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
stage = new Stage(new ScreenViewport());
|
stage = new Stage(new ScreenViewport());
|
||||||
targetPosition = new Vector3(stage.getCamera().position);
|
targetPosition = new Vector3(stage.getCamera().position);
|
||||||
|
@ -8,7 +8,7 @@ import com.badlogic.gdx.math.Vector3;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||||
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
import com.badlogic.gdx.utils.viewport.ScreenViewport;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.Audio;
|
import zero1hd.rhythmbullet.audio.Audio;
|
||||||
import zero1hd.rhythmbullet.ui.pages.AnalyzePage;
|
import zero1hd.rhythmbullet.ui.pages.AnalyzePage;
|
||||||
import zero1hd.rhythmbullet.ui.pages.MusicSelectionPage;
|
import zero1hd.rhythmbullet.ui.pages.MusicSelectionPage;
|
||||||
@ -23,9 +23,9 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter, M
|
|||||||
MusicSelectionPage ms;
|
MusicSelectionPage ms;
|
||||||
AnalyzePage ap;
|
AnalyzePage ap;
|
||||||
private Vector3 cameraPos;
|
private Vector3 cameraPos;
|
||||||
private Main core;
|
private RhythmBullet core;
|
||||||
|
|
||||||
public PreGameScreen(Main core) {
|
public PreGameScreen(RhythmBullet core) {
|
||||||
stage = new Stage(new ScreenViewport());
|
stage = new Stage(new ScreenViewport());
|
||||||
cameraPos = new Vector3(stage.getCamera().position);
|
cameraPos = new Vector3(stage.getCamera().position);
|
||||||
this.core = core;
|
this.core = core;
|
||||||
|
@ -16,7 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
import com.badlogic.gdx.utils.Align;
|
import com.badlogic.gdx.utils.Align;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
||||||
import zero1hd.rhythmbullet.audio.AudioData;
|
import zero1hd.rhythmbullet.audio.AudioData;
|
||||||
import zero1hd.rhythmbullet.audio.AudioInfo;
|
import zero1hd.rhythmbullet.audio.AudioInfo;
|
||||||
@ -57,8 +57,8 @@ public class AnalyzePage extends Page implements MiniListener {
|
|||||||
private Thread mapGenThread;
|
private Thread mapGenThread;
|
||||||
|
|
||||||
|
|
||||||
private Main core;
|
private RhythmBullet core;
|
||||||
public AnalyzePage(Main core) {
|
public AnalyzePage(RhythmBullet core) {
|
||||||
super("Results", core.getDefaultSkin());
|
super("Results", core.getDefaultSkin());
|
||||||
this.skin = core.getDefaultSkin();
|
this.skin = core.getDefaultSkin();
|
||||||
this.core = core;
|
this.core = core;
|
||||||
|
@ -13,7 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.screens.PreGameScreen;
|
import zero1hd.rhythmbullet.screens.PreGameScreen;
|
||||||
|
|
||||||
public class MainPage extends Page {
|
public class MainPage extends Page {
|
||||||
@ -26,11 +26,11 @@ public class MainPage extends Page {
|
|||||||
private TextButton credits;
|
private TextButton credits;
|
||||||
private WidgetGroup playButton;
|
private WidgetGroup playButton;
|
||||||
|
|
||||||
public MainPage(final Main core, final Vector3 targetPosition) {
|
public MainPage(final RhythmBullet core, final Vector3 targetPosition) {
|
||||||
polyjetTitle = new Image(core.getAssetManager().get("PolyjetTitle.png", Texture.class));
|
polyjetTitle = new Image(core.getAssetManager().get("PolyjetTitle.png", Texture.class));
|
||||||
polyjetTitle.setPosition(15, getHeight() - polyjetTitle.getHeight()-15);
|
polyjetTitle.setPosition(15, getHeight() - polyjetTitle.getHeight()-15);
|
||||||
addActor(polyjetTitle);
|
addActor(polyjetTitle);
|
||||||
polyJetVersion = new Label("Version: " + Main.VERSION, core.getDefaultSkin(), "sub-font",
|
polyJetVersion = new Label("Version: " + RhythmBullet.VERSION, core.getDefaultSkin(), "sub-font",
|
||||||
core.getDefaultSkin().getColor("default"));
|
core.getDefaultSkin().getColor("default"));
|
||||||
polyJetVersion.setPosition(3, 3);
|
polyJetVersion.setPosition(3, 3);
|
||||||
addActor(polyJetVersion);
|
addActor(polyJetVersion);
|
||||||
|
@ -7,7 +7,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.controls.KeyMap;
|
import zero1hd.rhythmbullet.controls.KeyMap;
|
||||||
import zero1hd.rhythmbullet.ui.builders.GraphicsTable;
|
import zero1hd.rhythmbullet.ui.builders.GraphicsTable;
|
||||||
import zero1hd.rhythmbullet.ui.builders.SetControls;
|
import zero1hd.rhythmbullet.ui.builders.SetControls;
|
||||||
@ -21,7 +21,7 @@ public class MoreOptionsPage extends Page {
|
|||||||
private GraphicsTable graphicsSettings;
|
private GraphicsTable graphicsSettings;
|
||||||
|
|
||||||
|
|
||||||
public MoreOptionsPage(Main core, final Vector3 targetLocation) {
|
public MoreOptionsPage(RhythmBullet core, final Vector3 targetLocation) {
|
||||||
keymap = new KeyMap(core);
|
keymap = new KeyMap(core);
|
||||||
|
|
||||||
TextButton backArrow = new TextButton("Back", core.getDefaultSkin());
|
TextButton backArrow = new TextButton("Back", core.getDefaultSkin());
|
||||||
|
@ -15,7 +15,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.AudioInfo;
|
import zero1hd.rhythmbullet.audio.AudioInfo;
|
||||||
import zero1hd.rhythmbullet.ui.builders.MusicSelectable;
|
import zero1hd.rhythmbullet.ui.builders.MusicSelectable;
|
||||||
import zero1hd.rhythmbullet.ui.windows.LoadingWindow;
|
import zero1hd.rhythmbullet.ui.windows.LoadingWindow;
|
||||||
@ -25,7 +25,7 @@ import zero1hd.rhythmbullet.util.MiniEvents;
|
|||||||
public class MusicSelectionPage extends Page {
|
public class MusicSelectionPage extends Page {
|
||||||
private volatile Table musicChoices;
|
private volatile Table musicChoices;
|
||||||
Preferences musicFileAnnotation;
|
Preferences musicFileAnnotation;
|
||||||
private Main core;
|
private RhythmBullet core;
|
||||||
private volatile ScrollPane musicChoiceScroller;
|
private volatile ScrollPane musicChoiceScroller;
|
||||||
|
|
||||||
private volatile LoadingWindow loadingWindow;
|
private volatile LoadingWindow loadingWindow;
|
||||||
@ -35,7 +35,7 @@ public class MusicSelectionPage extends Page {
|
|||||||
private FileHandle selectedMusic;
|
private FileHandle selectedMusic;
|
||||||
private AudioInfo selectedMusicInfo;
|
private AudioInfo selectedMusicInfo;
|
||||||
|
|
||||||
public MusicSelectionPage(final Main core) {
|
public MusicSelectionPage(final RhythmBullet core) {
|
||||||
super("Select music", core.getDefaultSkin());
|
super("Select music", core.getDefaultSkin());
|
||||||
this.core = core;
|
this.core = core;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.screens.CreativeDebugScreen;
|
import zero1hd.rhythmbullet.screens.CreativeDebugScreen;
|
||||||
import zero1hd.rhythmbullet.screens.MainMenu;
|
import zero1hd.rhythmbullet.screens.MainMenu;
|
||||||
|
|
||||||
@ -25,10 +25,10 @@ public class OptionsPage extends Page {
|
|||||||
private ProgressBar musicVolSlider;
|
private ProgressBar musicVolSlider;
|
||||||
private ProgressBar fxVolSlider;
|
private ProgressBar fxVolSlider;
|
||||||
private TextField directoryField;
|
private TextField directoryField;
|
||||||
private Main core;
|
private RhythmBullet core;
|
||||||
|
|
||||||
private byte goToScreen;
|
private byte goToScreen;
|
||||||
public OptionsPage(final Main core, final Vector3 targetPosition, final MoreOptionsPage moreOptionsPage) {
|
public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, final MoreOptionsPage moreOptionsPage) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
optionsTable.defaults().spaceLeft(40f).padTop(5f).padBottom(5f).left();
|
optionsTable.defaults().spaceLeft(40f).padTop(5f).padBottom(5f).left();
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
import com.badlogic.gdx.scenes.scene2d.ui.Window;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
import zero1hd.rhythmbullet.audio.AudioAnalyzer;
|
||||||
import zero1hd.rhythmbullet.audio.map.RhythmMapAlgorithm;
|
import zero1hd.rhythmbullet.audio.map.RhythmMapAlgorithm;
|
||||||
import zero1hd.rhythmbullet.screens.MainMenu;
|
import zero1hd.rhythmbullet.screens.MainMenu;
|
||||||
@ -45,7 +45,7 @@ public class CreativeHUD extends Stage implements MiniListener {
|
|||||||
Window toolbox;
|
Window toolbox;
|
||||||
|
|
||||||
GamePlayArea gpa;
|
GamePlayArea gpa;
|
||||||
public CreativeHUD(final Main core, final MainMenu mainMenu, final GamePlayArea gpa) {
|
public CreativeHUD(final RhythmBullet core, final MainMenu mainMenu, final GamePlayArea gpa) {
|
||||||
this.gpa = gpa;
|
this.gpa = gpa;
|
||||||
musicSelector = new MusicSelector("Select Audio File", core.getDefaultSkin(), core.getPrefs().getString("music dir"), "default");
|
musicSelector = new MusicSelector("Select Audio File", core.getDefaultSkin(), core.getPrefs().getString("music dir"), "default");
|
||||||
musicSelector.miniSender.addListener(this);
|
musicSelector.miniSender.addListener(this);
|
||||||
|
@ -11,7 +11,7 @@ import com.badlogic.gdx.graphics.glutils.ShaderProgram;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||||
import com.badlogic.gdx.utils.viewport.FitViewport;
|
import com.badlogic.gdx.utils.viewport.FitViewport;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.map.EntitySpawnInfo;
|
import zero1hd.rhythmbullet.audio.map.EntitySpawnInfo;
|
||||||
import zero1hd.rhythmbullet.audio.map.GamePlayMap;
|
import zero1hd.rhythmbullet.audio.map.GamePlayMap;
|
||||||
import zero1hd.rhythmbullet.audio.map.MapWindowData;
|
import zero1hd.rhythmbullet.audio.map.MapWindowData;
|
||||||
@ -33,7 +33,7 @@ public class GamePlayArea extends Stage {
|
|||||||
|
|
||||||
private int maxHealth = 100;
|
private int maxHealth = 100;
|
||||||
|
|
||||||
private float yTeleport = Main.GAME_AREA_HEIGHT/2;
|
private float yTeleport = RhythmBullet.GAME_AREA_HEIGHT/2;
|
||||||
|
|
||||||
private int score;
|
private int score;
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public class GamePlayArea extends Stage {
|
|||||||
private int fboSize;
|
private int fboSize;
|
||||||
|
|
||||||
public GamePlayArea(AssetManager assetManager, Preferences prefs) {
|
public GamePlayArea(AssetManager assetManager, Preferences prefs) {
|
||||||
super(new FitViewport(Main.GAME_AREA_WIDTH, Main.GAME_AREA_HEIGHT));
|
super(new FitViewport(RhythmBullet.GAME_AREA_WIDTH, RhythmBullet.GAME_AREA_HEIGHT));
|
||||||
Gdx.app.debug("Game Area", "new area created");
|
Gdx.app.debug("Game Area", "new area created");
|
||||||
|
|
||||||
polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard");
|
polyjet = new PolyJetEntity(assetManager, 25f, 25f, "standard");
|
||||||
@ -109,7 +109,7 @@ public class GamePlayArea extends Stage {
|
|||||||
getBatch().setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
|
getBatch().setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
getBatch().begin();
|
getBatch().begin();
|
||||||
getBatch().setShader(glowShader);
|
getBatch().setShader(glowShader);
|
||||||
getBatch().draw(fboRegion, 0f, 0f, Main.GAME_AREA_WIDTH, Main.GAME_AREA_HEIGHT);
|
getBatch().draw(fboRegion, 0f, 0f, RhythmBullet.GAME_AREA_WIDTH, RhythmBullet.GAME_AREA_HEIGHT);
|
||||||
getBatch().setShader(null);
|
getBatch().setShader(null);
|
||||||
getBatch().end();
|
getBatch().end();
|
||||||
|
|
||||||
@ -142,14 +142,14 @@ public class GamePlayArea extends Stage {
|
|||||||
polyjet.setX(1f);
|
polyjet.setX(1f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (polyjet.getX() >= Main.GAME_AREA_WIDTH-1-polyjet.getWidth()) {
|
if (polyjet.getX() >= RhythmBullet.GAME_AREA_WIDTH-1-polyjet.getWidth()) {
|
||||||
polyjet.moveRight = false;
|
polyjet.moveRight = false;
|
||||||
polyjet.setX(Main.GAME_AREA_WIDTH-1f-polyjet.getWidth());
|
polyjet.setX(RhythmBullet.GAME_AREA_WIDTH-1f-polyjet.getWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (polyjet.getY() >= Main.GAME_AREA_HEIGHT - 1 - polyjet.getHeight()) {
|
if (polyjet.getY() >= RhythmBullet.GAME_AREA_HEIGHT - 1 - polyjet.getHeight()) {
|
||||||
polyjet.moveUp = false;
|
polyjet.moveUp = false;
|
||||||
polyjet.setY(Main.GAME_AREA_HEIGHT - 1 - polyjet.getHeight());
|
polyjet.setY(RhythmBullet.GAME_AREA_HEIGHT - 1 - polyjet.getHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (polyjet.getY() <= 1) {
|
if (polyjet.getY() <= 1) {
|
||||||
|
@ -3,7 +3,7 @@ package zero1hd.rhythmbullet.desktop;
|
|||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
|
||||||
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.Main;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
|
|
||||||
public class DesktopLauncher {
|
public class DesktopLauncher {
|
||||||
public static void main (String[] arg) {
|
public static void main (String[] arg) {
|
||||||
@ -15,7 +15,7 @@ public class DesktopLauncher {
|
|||||||
// System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");
|
// System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");
|
||||||
|
|
||||||
|
|
||||||
new LwjglApplication(new Main(), config);
|
new LwjglApplication(new RhythmBullet(), config);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|