Jump to content

Game resources from bindata.


Recommended Posts

I receive the encrypted file from the server containing the sounds, images, atlases. I found a solution how to get the image from the data array.

    let imageData = window.DWP(dataArray);
    let bmd:Phaser.BitmapData = this.game.add.bitmapData(imageData.width, imageData.height, key, true);
    bmd.ctx.putImageData(imageData, 0, 0);

    let imageSprite:Phaser.Sprite = this.game.make.sprite(this.currentImageXPos, 0, bmd.texture);

How to work with other resource types, such as sounds and xml? Thank you

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...