Skip to content

Commit

Permalink
win music, icon and credits
Browse files Browse the repository at this point in the history
  • Loading branch information
msx80 committed Aug 29, 2024
1 parent ad5057a commit 45ca338
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
Binary file modified android-mvn/src/main/res/drawable/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ protected List<Richtext> lines() {
Richtext.of("Sounds by: Juhani Junkala"),
Richtext.with("https://juhanijunkala.com/", 13, "https://juhanijunkala.com/"),
Richtext.of(""),
Richtext.of("Music by: RandomMind"),
Richtext.with("https://youtube.com/channel/UCvjkkwGL7g092E1oV7IMffw", 13, "https://youtube.com/channel/UCvjkkwGL7g092E1oV7IMffw"),
Richtext.of("Game Music by: RandomMind"),
Richtext.with("https://www.youtube.com/@randommynd", 13, "https://www.youtube.com/@randommynd"),
Richtext.of(""),
Richtext.of("Win Music by: Vincent Fasano"),
Richtext.with("https://www.vincentfasano.com/", 13, "https://www.vincentfasano.com/"),
Richtext.of(""),
Richtext.of("Beta Testing: ceonello, carlessa"),
Richtext.of("Thanks to: ATP37, krushia"),
Richtext.of(""),
Richtext.of("Powered by: OMICRON game engine"),
Richtext.with("https://github.com/msx80/Omicron", 13, "https://github.com/msx80/Omicron"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,17 @@ private Step makeWinStep(final Sys sys) {

Runnable onEnter = () -> {
sys.stopMusic();
doSound(19, 0.8f, 1f);
sys.music(2, 0.3f, false);
//doSound(19, 0.8f, 1f);

doFinalScoreAnimation("YOU WON!!");
doFinalScoreAnimation(true);


};

return new Step( onEnter, null, () -> Arrays.asList(
new Action("Try Again", () -> {
new Action("Play Again", () -> {
sys.stopMusic();
if (musicOn()) sys.music(1, 0.3f, true);
enterStep(INTRO);
})
Expand All @@ -575,7 +577,7 @@ private Step makeDeathStep(final Sys sys) {
doSound(19, 0.8f, 1f);

// play sound!
doFinalScoreAnimation("YOU'RE DEAD!!");
doFinalScoreAnimation(false);
// this.animPG(, 6, null);
};

Expand All @@ -587,10 +589,10 @@ private Step makeDeathStep(final Sys sys) {
));
}

private void doFinalScoreAnimation(String message) {
private void doFinalScoreAnimation(boolean win) {
anims.add(Easing.LINEAR, 240, a -> {
if (run.score() > getHighScore()) {
doSound(17, 0.8f, 1f);
if(!win) doSound(17, 0.8f, 1f); // no jingle for winscreen or it covers the music
log.add(11, "!! NEW HIGH SCORE !!");
log.add(15, "YOUR NEW HIGH SCORE IS: ", 13, "" + run.score());
setHighScore(run.score());
Expand All @@ -599,7 +601,7 @@ private void doFinalScoreAnimation(String message) {
});
}
}, 0,50, a -> {
p.printBig(message, 120, 50 - a / 4, 6, Align.CENTER);
p.printBig(win?"YOU WON!!":"YOU'RE DEAD!!", 120, 50 - a / 4, win?11:6, Align.CENTER);
});
}

Expand Down Expand Up @@ -1023,9 +1025,10 @@ public boolean loop() {
public void exitDungeon() {
run.exited = true;
log.add(15, "");
log.add(7, "===== GAME FINISHED ====");
log.add(15, "You head toward the exit.");
log.add(15, "You fought well, warrior.");
log.add(7, " --======= ", 15, "!! GAME FINISHED !!",7," ======-- ");
log.add(15, "");
log.add(15, "You head toward the exit, tired but");
log.add(15, "victorious. You fought well, warrior.");
log.add(14, "Your final score is: ", 8, ""+run.score());
enterStep(WIN);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void init() {


/*
// pg.inventoryAdd(Item.Map, 1);
pg.inventoryAdd(Item.Map, 1);
pg.inventoryAdd(Item.Rock, 1000);
pg.inventoryAdd(Item.Slingshot, 1);
Expand Down
Binary file not shown.

0 comments on commit 45ca338

Please sign in to comment.