diff --git a/core/assets/sounds/credits.txt b/core/assets/sounds/credits.txt index a6ad470..d471b9e 100644 --- a/core/assets/sounds/credits.txt +++ b/core/assets/sounds/credits.txt @@ -1,10 +1,17 @@ MUSIQUE : -menu pause : +Crédits: House Bensound "Royalty Free Music from Bensound" : https://www.bensound.com/royalty-free-music/track/house + +Menu pause : + +Metre - Concentric +Attribution-NonCommercial 4.0 International License. +https://www.freemusicarchive.org/music/Metre/kinetic/concentric + menu principal : Deflector diff --git a/core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3 b/core/assets/sounds/effects/arrow_landed.mp3 similarity index 100% rename from core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3 rename to core/assets/sounds/effects/arrow_landed.mp3 diff --git a/core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3 b/core/assets/sounds/effects/arrow_shot.mp3 similarity index 100% rename from core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3 rename to core/assets/sounds/effects/arrow_shot.mp3 diff --git a/core/assets/sounds/VOXScrm_Cri wilhelm (ID 0477)_LS.wav b/core/assets/sounds/effects/player_death.wav similarity index 100% rename from core/assets/sounds/VOXScrm_Cri wilhelm (ID 0477)_LS.wav rename to core/assets/sounds/effects/player_death.wav diff --git a/core/assets/sounds/bensound-house.mp3 b/core/assets/sounds/music/credit_music.mp3 similarity index 100% rename from core/assets/sounds/bensound-house.mp3 rename to core/assets/sounds/music/credit_music.mp3 diff --git a/core/assets/sounds/HMO-MercuryCity.mp3 b/core/assets/sounds/music/game_music.mp3 similarity index 100% rename from core/assets/sounds/HMO-MercuryCity.mp3 rename to core/assets/sounds/music/game_music.mp3 diff --git a/core/assets/sounds/Ghostrifter-Deflector.mp3 b/core/assets/sounds/music/mainMenu_music.mp3 similarity index 100% rename from core/assets/sounds/Ghostrifter-Deflector.mp3 rename to core/assets/sounds/music/mainMenu_music.mp3 diff --git a/core/assets/sounds/Metre - Concentric.mp3 b/core/assets/sounds/music/resumeMenu_music.mp3 similarity index 100% rename from core/assets/sounds/Metre - Concentric.mp3 rename to core/assets/sounds/music/resumeMenu_music.mp3 diff --git a/core/assets/sounds/sf_fleche_plante_01.mp3 b/core/assets/sounds/sf_fleche_plante_01.mp3 deleted file mode 100644 index 202ffdd..0000000 Binary files a/core/assets/sounds/sf_fleche_plante_01.mp3 and /dev/null differ diff --git a/core/src/sagittarius/model/Arrow.java b/core/src/sagittarius/model/Arrow.java index 919b6af..b70c501 100644 --- a/core/src/sagittarius/model/Arrow.java +++ b/core/src/sagittarius/model/Arrow.java @@ -56,8 +56,8 @@ public class Arrow extends EntityQuad { if (!preview) { - arrowLandedSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/TOONTwang_Plante cartoon 6 (ID 1955)_LS.mp3")); - arrowHitSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/VOXScrm_Cri wilhelm (ID 0477)_LS.wav")); + arrowLandedSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/effects/arrow_landed.mp3")); + arrowHitSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/effects/player_death.wav")); texture = new ArrayList<>(); String path = "core/assets/arrow" + MathUtils.random(2); diff --git a/core/src/sagittarius/model/Bow.java b/core/src/sagittarius/model/Bow.java index 994068e..ed1e347 100644 --- a/core/src/sagittarius/model/Bow.java +++ b/core/src/sagittarius/model/Bow.java @@ -19,7 +19,7 @@ public class Bow extends Actor { private boolean aimAssist = false; private boolean pressed = false; private float angle; - private Sound shotSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/SWSH_Whoosh 3 (ID 1795)_LS.mp3")); + private Sound shotSound = Gdx.audio.newSound(Gdx.files.internal("core/assets/sounds/effects/arrow_shot.mp3")); private Vector2 anchor = new Vector2(); private Vector2 aim = new Vector2(); diff --git a/core/src/sagittarius/view/CreditScreen.java b/core/src/sagittarius/view/CreditScreen.java new file mode 100644 index 0000000..f44d03b --- /dev/null +++ b/core/src/sagittarius/view/CreditScreen.java @@ -0,0 +1,61 @@ +package sagittarius.view; + +import com.badlogic.gdx.Gdx; +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener; +import com.kotcrab.vis.ui.VisUI; +import com.kotcrab.vis.ui.widget.VisTable; +import com.kotcrab.vis.ui.widget.VisTextButton; + +import sagittarius.SagittariusGame; + +public class CreditScreen extends BaseScreen { + + @Override + public void initialize() { + + // A music is played + if (!SagittariusGame.disableMusic){ + + SagittariusGame.music.stop(); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/credit_music.mp3")); + SagittariusGame.music.setLooping(true); + SagittariusGame.music.play(); + + } + + Gdx.input.setInputProcessor(uiStage); + + // Table creation + VisTable table = new VisTable(true); + table.setFillParent(true); + uiStage.addActor(table); + + + + // go back button + VisTextButton returnButton = new VisTextButton("Go Back"); + returnButton.addListener(new ActorGestureListener() { + @Override + public void tap(InputEvent event, float x, float y, int count, int button) { + super.tap(event, x, y, count, button); + SagittariusGame.setActiveScreen( new StartScreen() ); + } + }); + + table.add(returnButton).width(150); + table.row(); + } + + @Override + public void update(float dt) { + // nothing (?) + } + + @Override + public void dispose() { + VisUI.dispose(); + super.dispose(); + } + +} \ No newline at end of file diff --git a/core/src/sagittarius/view/GameScreen.java b/core/src/sagittarius/view/GameScreen.java index 0cde633..432aa6e 100644 --- a/core/src/sagittarius/view/GameScreen.java +++ b/core/src/sagittarius/view/GameScreen.java @@ -51,7 +51,7 @@ public class GameScreen extends BaseScreen implements InputProcessor { if (!SagittariusGame.disableMusic){ SagittariusGame.music.stop(); - SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/HMO-MercuryCity.mp3")); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/game_music.mp3")); SagittariusGame.music.setLooping(true); SagittariusGame.music.play(); diff --git a/core/src/sagittarius/view/ResumeScreen.java b/core/src/sagittarius/view/ResumeScreen.java index ec86d66..5e5295d 100644 --- a/core/src/sagittarius/view/ResumeScreen.java +++ b/core/src/sagittarius/view/ResumeScreen.java @@ -25,7 +25,7 @@ public class ResumeScreen extends BaseScreen { if (!SagittariusGame.disableMusic){ SagittariusGame.music.stop(); - SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Metre - Concentric.mp3")); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/resumeMenu_music.mp3")); SagittariusGame.music.setLooping(true); SagittariusGame.music.play(); } diff --git a/core/src/sagittarius/view/SettingsScreen.java b/core/src/sagittarius/view/SettingsScreen.java index ca30b7e..c10dfc4 100644 --- a/core/src/sagittarius/view/SettingsScreen.java +++ b/core/src/sagittarius/view/SettingsScreen.java @@ -20,7 +20,7 @@ public class SettingsScreen extends BaseScreen { if (!SagittariusGame.disableMusic){ SagittariusGame.music.stop(); - SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Metre - Concentric.mp3")); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/resumeMenu_music.mp3")); SagittariusGame.music.setLooping(true); SagittariusGame.music.play(); } diff --git a/core/src/sagittarius/view/StartScreen.java b/core/src/sagittarius/view/StartScreen.java index 83f5344..f71b2b1 100644 --- a/core/src/sagittarius/view/StartScreen.java +++ b/core/src/sagittarius/view/StartScreen.java @@ -18,13 +18,13 @@ public class StartScreen extends BaseScreen { if (!SagittariusGame.disableMusic){ if ( SagittariusGame.music != null ){ SagittariusGame.music.stop(); - SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Ghostrifter-Deflector.mp3")); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/mainMenu_music.mp3")); SagittariusGame.music.setLooping(true); SagittariusGame.music.play(); } else { - SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/Ghostrifter-Deflector.mp3")); + SagittariusGame.music = Gdx.audio.newMusic(Gdx.files.internal("core/assets/sounds/music/mainMenu_music.mp3")); SagittariusGame.music.setLooping(true); SagittariusGame.music.play(); } @@ -57,6 +57,16 @@ public class StartScreen extends BaseScreen { } }); + VisTextButton creditButton = new VisTextButton("Credits"); + creditButton.addListener(new ActorGestureListener() { + @Override + public void tap(InputEvent event, float x, float y, int count, int button) { + super.tap(event, x, y, count, button); + SagittariusGame.setActiveScreen( new CreditScreen() ); + } + }); + + // Quit button VisTextButton quitButton = new VisTextButton("Exit"); quitButton.addListener(new ActorGestureListener() { @@ -72,6 +82,8 @@ public class StartScreen extends BaseScreen { table.row(); table.add(settingsButton).width(150); table.row(); + table.add(creditButton).width(150); + table.row(); table.add(quitButton).width(150); table.row(); }