我想在我的游戏中添加一个按钮,点击它会打开一个指向我的应用在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;
}
}