Jump to content

Search the Community

Showing results for tags 'pack'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3 results

  1. Hi, `Loader#pack` works as follow: It first downloads the json file using XHR and then all the related assets. `Loader#onPackComplete` is triggered when json file was downloaded and all assets were enqueued in its internal queue. What if I would like to be notified *ONLY* when all related assets of current pack were downloaded?? How can I achieve this kind of behaviour assuming that I'm downloading multiple packs! Thank you!
  2. Hi guys! If you need quality 2d game assets please visit my shop. Comments and suggestions are welcome. Thank you:)
  3. Hi Guys, I just try to optimize game with huge pack of assets, and the idea is to load pack of assets, ant then do something in the game. I experienced strange behaviour of onPackComplete callback, wich is illustrated by following code example: assets.json: { "preloader": [{ "type": "image", "key": "pickard", "url": "assets/pickard.gif", "overwrite": false }]} var main = { preload: function() { }, create: function() { game.load.reset(); //following section is not working - but I can see in debug console/network console that file is loaded game.load.pack('preloader', 'assets.json'); game.load.onPackComplete.add(function(hasBeenLoaded) { console.log(hasBeenLoaded); game.add.sprite(0, 0, 'pickard'); //Gives: "Texture with key 'pickard' not found." }, this); //this is working just fine game.load.image('pickard', 'assets/pickard.gif'); game.load.onLoadComplete.add(function() { game.add.sprite(0, 0, 'pickard'); }) game.load.start(); }, update: function() { },};var game = new Phaser.Game(592, 296, Phaser.AUTO, 'gameDiv');game.state.add('main', main);game.state.start('main');I tried to move preloading of pack to preload function, and later add sprite in create function, works OK. Well, as far as I could expect, assets should be ready to use when onPackComplete callback is being called, am I right?
×
×
  • Create New...