我想在我的游戏中添加一个按钮,该按钮将打开我在 Play 商店中的应用程序的 URL。以下是我到目前为止所得到的,但是当我单击速率按钮时,它不会打开相应的 URL。
我的费率代码是:
if(Gdx.input.justTouched()){
guiCam.unproject(touchPoint.set(Gdx.input.getX(),Gdx.input.getY(), 0));
if(OverlapTester.pointInRectangle(rateButtonBound, touchPoint.x, touchPoint.y)){
try {
Process p = Runtime.getRuntime().exec("cmd /c start https://play.google.com/store/apps/details?id=com.shagunstudios.racinggame");
}
catch (IOException e1) {
System.out.println(e1);
}
if(Settings.soundEnabled)
Assets.click_sound.play(1.0f);
return;
}
}