我想在我的遊戲中添加一個按鈕,該按鈕將在Play商店中打開我的應用的網址。下面是我到目前爲止,但是當我點擊率按鈕,它不會打開相應的網址。在libgdx遊戲中添加「評價我的應用」按鈕
我率的代碼是:
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;
}
}
不適用於機器人或臺式機 –
想要提供更多詳細信息? –
嗯,現在是工作,我不知道爲什麼我用得到崩潰 –