标签:
1 public class DesktopStarter { 2 public static void main(String[] argv) { 3 LwjglApplicationConfiguration config =new LwjglApplicationConfiguration(); 4 new LwjglApplication(new MyGame(), config); 5 } 6 }
1 public class AndroidStarter extends AndroidApplication { 2 public void onCreate(Bundle bundle) { 3 super.onCreate(bundle); 4 AndroidApplicationConfiguration config =new AndroidApplicationConfiguration(); 5 initialize(new MyGame(), config); 6 } 7 }
1 public class MyGame implements ApplicationListener { 2 public void create () { 3 } 4 5 public void render () { 6 } 7 8 public void resize (int width, int height) { 9 } 10 11 public void pause () { 12 } 13 14 public void resume () { 15 } 16 17 public void dispose () { 18 } 19 }
【开源java游戏框架libgdx专题】-04-接口介绍及生命周期
标签:
原文地址:http://www.cnblogs.com/AIThink/p/5835718.html