Example #1
0
  @Override
  public void create(MultiScreenAssetManager assetManager) {
    base = new Base();

    Button button =
        new Button(
            assetManager.getSprite(TEXTURE_ATLAS_NAME, BUTTON_UP_IMAGE),
            assetManager.getSprite(TEXTURE_ATLAS_NAME, BUTTON_DOWN_IMAGE),
            new Vector2(300, 400),
            new Vector2(200, 200));
    button.setName("NewGameButton");
    button.addScript(new NewGameScript(controller.getScreenHandler()));
    base.addObject(button);

    base.initialize();
    base.processInput();
    this.assetManager = assetManager;
    assetManager.load(DemoScreen.DEMO_TEXTURE_ATLAS, TextureAtlas.class);
  }
Example #2
0
 @Override
 public void render(float delta) {
   assetManager.update();
   base.update();
   base.render();
 }