0
IM加吐司試圖創建與接口 接口稱之爲吐司工作正常,只是,當我嘗試敬酒它,它崩潰我不能在libgdx
在Android啓動
public class AndroidLauncher extends AndroidApplication implements Interface {
public void tost() {
Toast.makeText(getContext(), "wrong num",
Toast.LENGTH_LONG).show();}}
在gameclass
interface Interface{void tost();}
public class MyGdxGame extends ApplicationAdapter {
final private Interface interface;
public MyGdxGame(Interface interface){this.interface=interface;}
public void render() {interface.tost}