mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 13:31:45 -08:00
Added landing sound
This commit is contained in:
parent
a241d6f5bb
commit
2a74bb742b
4 changed files with 18 additions and 5 deletions
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;
|
||||
|
||||
//TODO this sounds pretty bad due to conflict
|
||||
Musics.land.stop();
|
||||
Musics.land.play();
|
||||
|
||||
app.post(() -> ui.hudfrag.showLand());
|
||||
renderer.zoomIn(Fx.coreLand.lifetime);
|
||||
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);
|
||||
}
|
||||
|
||||
public void stop(){
|
||||
silenced = true;
|
||||
if(current != null){
|
||||
current.stop();
|
||||
current = null;
|
||||
fade = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
/** Update and play the right music track.*/
|
||||
public void update(){
|
||||
if(state.isMenu()){
|
||||
|
|
|
|||
|
|
@ -93,10 +93,10 @@ public class PlanetDialog extends FloatingDialog{
|
|||
|
||||
//TODO names
|
||||
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("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||
buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
||||
//buttons.addImageTextButton("Database", Icon.book, style, () -> ui.database.show()).margin(bmargin);
|
||||
//buttons.addImageTextButton("Resources", Icon.file, style, this::hide).margin(bmargin);
|
||||
|
||||
cam.fov = 60f;
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ public class PlanetDialog extends FloatingDialog{
|
|||
|
||||
stable.row();
|
||||
|
||||
stable.addButton("Launch", () -> {
|
||||
stable.addButton("Launch", Styles.transt, () -> {
|
||||
if(selected != null){
|
||||
if(selected.is(SectorAttribute.naval)){
|
||||
ui.showInfo("You need a naval loadout to launch here.");
|
||||
|
|
@ -366,7 +366,7 @@ public class PlanetDialog extends FloatingDialog{
|
|||
control.playSector(selected);
|
||||
hide();
|
||||
}
|
||||
}).size(120f, 50f).pad(2f);
|
||||
}).growX().padTop(2f).height(50f).minWidth(170f);
|
||||
|
||||
stable.pack();
|
||||
stable.setPosition(x, y, Align.center);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue