I'm programming a game which includes a pausable looping BGM, so...
I was wondering if it was possible to continue a looping file at the point it was paused? After all, if I pause the music with bgm.pause(), then start it again with bgm.loop(), it will start at the beginning.
Alternate question: Using the method explained above, you'll hear a fractal of a second of the music file at the point it was paused, then it starts from the beginning. Is there a way to completely stop the file instead of pausing it? (with avoiding bgm.close()? as that requires a new call of the music file when "unpausing")
Ah yeah, if this wasn't clear, using the Minim class and commands... I couldn't find answers to my questions in the Minim code log.
I'm working on some little jump n run game for an assignment.
For that, of course, I need multiple keys pressed to work. (Until now) we only have the basic actions move left, move right and jump, which all by themself are working as they should.
But once one of the keys is released, the other action will stop (e.g. move left and jump - moving left while pressing jump (pressing both at the same time) is possible, moving left stops when releasing jump, even though left is still pressed). This is a problem I'd like to fix.
The code extract this applies to is here, if the whole code is needed, I can provide it, but I'd like to avoid that as it is already a rather complex program.
/*Der Charakter soll nach oben springen, aber ab einer
bestimmten Höhe wieder fallen.
Danach soll es möglich sein, ihn in eine bestimmte
Richtung springen zu lassen*/
}
}
}