Beispiel #1
0
  @Override
  protected Scene onCreateScene() { // #3
    this.scene = new Scene();
    this.scene.setBackground(new Background(0.9804f, 0.6274f, 0.8784f));
    // Probamos la celda

    FontFactory.setAssetBasePath("fuentes/");
    final ITexture fontTexture =
        new BitmapTextureAtlas(
            getTextureManager(), 256, 256, TextureOptions.BILINEAR); // textura para la fuente
    Font myFont;
    myFont =
        FontFactory.createFromAsset(
            getFontManager(), fontTexture, getAssets(), "fuente.ttf", 40, true, Color.WHITE);
    myFont.load();
    Celda unaCelda =
        new Celda(
            camera.getWidth() / 2,
            camera.getHeight() / 2,
            celdaTextureRegion,
            getVertexBufferObjectManager(),
            myFont);
    unaCelda.addToScene(scene);

    // scene.attachChild(rectangulo);
    return this.scene;
  }