Fairydhwen

Members
  • Content Count

    18
  • Joined

  • Last visited

About Fairydhwen

  • Rank
    Member

Contact Methods

  • Twitter
    Fairydhwen

Recent Profile Visitors

664 profile views
  1. Thank you Rich, indeed this.load.on('complete', () => { }); is probably what i was looking for Fairy.
  2. Hi, I'm just starting to look at this new version of Phaser which looks realy great (congratz!). I'was wondering if there were available events to know when all preloads on game or on a scene are loaded ? At the moment, i set a flag in the update method and then emit a signal with an event i created in my scene. But i'm pretty sure they is a more simple way ? 😛 regards, Fairy.
  3. You can chack my workaround here :
  4. Phaser 3.11.0 with Angular 6 Workaround : 1. install angular project with cli 2. add Phaser to your project with npm 3. copy the phaser.d.ts from the official phaser 3 doc into your src folder 4. modify this files by adding at the begining : declare interface ActiveXObject {} declare interface GamepadHapticActuator {} 5. add phaser.js into the angular.json, in the scripts section : "node_modules/phaser/dist/phaser.js" This should now works. (but this will need more inspection with ActiveXObject and GamepadHapticActuator). Regards
  5. Hey, I'm also looking to integrate Phaser 3 into Angular 6 and dont get a proper way... ATM there is a nice module you can use to do this : https://github.com/TristanBonsor/phaser-component-library This works great. Let me know if you find the solution. Regards.
  6. Looks like your babylon.d.ts doesn't have any export.
  7. Hey, can we have a link to your babylon.d.ts file pls? Fairy
  8. No, Phaser 2 dont support collection of images. https://github.com/photonstorm/phaser/issues/1339 Only TileSet for V2. :'(
  9. but how do i load them ? my problem is i dont have one file (tileset.png) for all my images. (5 PNG like in my example for 1 tileset)
  10. Hey, Does Phaser can import collection of images (not tileset) for a tilemap from Tiled? Only function i found is : game.load.image(tileName, tileSetFile); // here i need to load all my images (which are not in a tileset) then map.addTilesetImage(inTiledTileSetName, tileName); from my JSON tilemap : "tilesets":[ { "columns":0, "firstgid":1, "margin":0, "name":"Sol", "spacing":0, "tilecount":5, "tileheight":128, "tiles": { "0": { "image":"PNG\/Environment\/dirt.png" }, "1": { "image":"PNG\/Environment\/grass.png" }, "2": { "image":"PNG\/Environment\/sand.png" }, "3": { "image":"PNG\/Environment\/treeLarge.png" }, "4": { "image":"PNG\/Environment\/treeSmall.png" } }, "tilewidth":128 }, Regards
  11. Hey, you can now download a complete Visual Studio Template for Phaser with TypeScript : (it's up to date and easy to install (VS Extension)) https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2 Regards, Fairy
  12. Hey, I finaly made a full template for Phaser projects with TypeScript. You can get it at : https://github.com/fairydhwen/PhaserTypeScriptTemplate This is a complete structure for small to large projects with best practices i found. There is all you need to start, with sample inspired from Richard's tutorial. Please feel free to contact me if you have any questions or comments Regards, Fairydhwen
  13. Hi, I'm reading this tutorial (2nd part) : http://www.gamefromscratch.com/post/2014/06/24/Adventures-in-Phaser-with-TypeScript-Handling-Keyboard-Input.aspx in the second exemple, we got something like : class SimpleGame { constructor() { this.game = new Phaser.Game(640, 480, Phaser.AUTO, 'content', { create: this.create});} moveUp(e: KeyboardEvent) { this.jetSprite.position.add(0, -1); } create() { this.W.onDown.add(SimpleGame.prototype.moveUp, this); } } can someone tell me why we need to use SimpleGame.prototype.moveUp to call this method? (and not just this.moveUP ?) is this because we are using this context ? regards,
  14. Hey, this is my setup, what do you think about my template ? i used the combine javascript output into file u told me. (nice tip!) Any other tools or configuration i could use ? (web config etc.?) Regards,
  15. ty, i will follow your advice. PS: your tutorial looks really cool