initialize()方法的作用是启动Gdx

Game本身实现了ApplicationListener接口

 

button

  tx2 = new Texture(Gdx.files.internal("button1_480.png"));

  •            tx1 = new Texture(Gdx.files.internal("button2_480.png"));
  •            tx3 = new Texture(Gdx.files.internal("button3_480.png"));
  •            NinePatch n1 = new NinePatch(tx1, 14, 14, 18, 18);
  •            NinePatch n2 = new NinePatch(tx2, 14, 14, 18, 18);
  •            NinePatch n3 = new NinePatch(tx3, 14, 14, 18, 18);
  •          
  •          
  •            button = new Button( new ButtonStyle(n1, n2, n3, 0f, 0f, 0f, 0f), "Start");