Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Game resources from bindata.


Kamaz
 Share

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

 Share

  • Recently Browsing   0 members

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