Added landing sound
This commit is contained in:
BIN
core/assets/music/land.ogg
Normal file
BIN
core/assets/music/land.ogg
Normal file
Binary file not shown.
@@ -166,6 +166,10 @@ public class Control implements ApplicationListener, Loadable{
|
|||||||
|
|
||||||
if(core == null) return;
|
if(core == null) return;
|
||||||
|
|
||||||
|
//TODO this sounds pretty bad due to conflict
|
||||||
|
Musics.land.stop();
|
||||||
|
Musics.land.play();
|
||||||
|
|
||||||
app.post(() -> ui.hudfrag.showLand());
|
app.post(() -> ui.hudfrag.showLand());
|
||||||
renderer.zoomIn(Fx.coreLand.lifetime);
|
renderer.zoomIn(Fx.coreLand.lifetime);
|
||||||
app.post(() -> Fx.coreLand.at(core.getX(), core.getY(), 0, core.block()));
|
app.post(() -> Fx.coreLand.at(core.getX(), core.getY(), 0, core.block()));
|
||||||
|
|||||||
@@ -43,6 +43,15 @@ public class MusicControl{
|
|||||||
darkMusic = Array.with(Musics.game2, Musics.game5, Musics.game7);
|
darkMusic = Array.with(Musics.game2, Musics.game5, Musics.game7);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void stop(){
|
||||||
|
silenced = true;
|
||||||
|
if(current != null){
|
||||||
|
current.stop();
|
||||||
|
current = null;
|
||||||
|
fade = 0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Update and play the right music track.*/
|
/** Update and play the right music track.*/
|
||||||
public void update(){
|
public void update(){
|
||||||
if(state.isMenu()){
|
if(state.isMenu()){
|
||||||
|
|||||||
@@ -93,10 +93,10 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
|
|
||||||
//TODO names
|
//TODO names
|
||||||
buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin);
|
buttons.addImageTextButton("$back", Icon.left, style, this::hide).margin(bmargin);
|
||||||
buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin);
|
//buttons.addImageTextButton("Tech", Icon.tree, style, () -> ui.tech.show()).margin(bmargin);
|
||||||
//buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin);
|
//buttons.addImageTextButton("Launch", Icon.upOpen, style, this::hide).margin(bmargin);
|
||||||
buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
//buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||||
buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
//buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
||||||
|
|
||||||
cam.fov = 60f;
|
cam.fov = 60f;
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
|
|
||||||
stable.row();
|
stable.row();
|
||||||
|
|
||||||
stable.addButton("Launch", () -> {
|
stable.addButton("Launch", Styles.transt, () -> {
|
||||||
if(selected != null){
|
if(selected != null){
|
||||||
if(selected.is(SectorAttribute.naval)){
|
if(selected.is(SectorAttribute.naval)){
|
||||||
ui.showInfo("You need a naval loadout to launch here.");
|
ui.showInfo("You need a naval loadout to launch here.");
|
||||||
@@ -366,7 +366,7 @@ public class PlanetDialog extends FloatingDialog{
|
|||||||
control.playSector(selected);
|
control.playSector(selected);
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
}).size(120f, 50f).pad(2f);
|
}).growX().padTop(2f).height(50f).minWidth(170f);
|
||||||
|
|
||||||
stable.pack();
|
stable.pack();
|
||||||
stable.setPosition(x, y, Align.center);
|
stable.setPosition(x, y, Align.center);
|
||||||
|
|||||||
Reference in New Issue
Block a user