We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In some configurations, sound clips can only be played once.
Sample code:
public class SoundTest extends SceneGame { boolean playAgain = true; playn.core.Sound sound; public SoundTest (final Platform plat) { super(plat, 33); // update our "simulation" 33ms (30 times per second) // create and add background image layer Image bgImage = plat.assets().getImage("images/bg.png"); ImageLayer bgLayer = new ImageLayer(bgImage); // scale the background to fill the screen bgLayer.setSize(plat.graphics().viewSize); rootLayer.add(bgLayer); sound = plat.assets().getSound("sounds/drop"); sound.play(); } public void update(Clock t) { if (playAgain && plat.tick() > 5000) { sound.play(); playAgain = false; } } }
This may be related to the following:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In some configurations, sound clips can only be played once.
Sample code:
This may be related to the following:
The text was updated successfully, but these errors were encountered: