Beispiel #1
0
  @Override
  protected void loadResources() {
    super.loadResources();

    this.loadFont();

    BitmapTextureAtlas bitmapTextureAtlas =
        new BitmapTextureAtlas(
            getTextureManager(), 1024, 128, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    textureRegion =
        BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
            bitmapTextureAtlas, this, "bulles.png", 0, 0, 10, 1);
    bitmapTextureAtlas.load();

    BitmapTextureAtlas bitmapTextureAtlasScore =
        new BitmapTextureAtlas(
            getTextureManager(), 1024, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    textureRegionScore =
        BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
            bitmapTextureAtlasScore, this, "background_brown.png", 0, 0, 1, 1);
    bitmapTextureAtlasScore.load();

    BitmapTextureAtlas bitmapTextureAtlasExplosione =
        new BitmapTextureAtlas(
            getTextureManager(), 1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    textureRegionExplosion =
        BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
            bitmapTextureAtlasExplosione, this, "explosion.png", 0, 0, 7, 7);
    bitmapTextureAtlasExplosione.load();

    BitmapTextureAtlas bitmapTextureAtlasPlate =
        new BitmapTextureAtlas(
            getTextureManager(), 512, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    plateTextureRegion =
        BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
            bitmapTextureAtlasPlate, this, "plate.png", 0, 0, 1, 1);
    bitmapTextureAtlasPlate.load();

    BitmapTextureAtlas bitmapTextureAtlasHeader =
        new BitmapTextureAtlas(
            getTextureManager(), 512, 512, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
    headerTextureRegion =
        BitmapTextureAtlasTextureRegionFactory.createTiledFromAsset(
            bitmapTextureAtlasHeader, this, "header_background.png", 0, 0, 1, 1);
    bitmapTextureAtlasHeader.load();

    if (null != this.getIntent().getExtras())
      animated = this.getIntent().getExtras().getBoolean("ANIMATED");
  }
Beispiel #2
0
  @Override
  public void onPopulateScene(final Scene pScene, OnPopulateSceneCallback pOnPopulateSceneCallback)
      throws Exception {
    this.initDimension();
    this.initAction();
    this.initMatrix();
    this.initHeader();
    this.initPlate();
    this.initScore();
    this.initBulles();

    pScene.setTouchAreaBindingOnActionDownEnabled(true);

    super.onPopulateScene(pScene, pOnPopulateSceneCallback);
  }