Fenopiù

Members
  • Content Count

    94
  • Joined

  • Last visited

Everything posted by Fenopiù

  1. Seems cool... but I think it have similar weight of multiple tweens, I'm I right?
  2. When I've had a very similar issue, it was for Phaser.Text and webfonts. When it had to load several text with webfont (in local) FPS was flop and immediately raise back.
  3. Maybe in future... right now there are no TS defs :-(
  4. Try to give data the default values when you declare it.
  5. @speedo has made a guide for Phaser with Bracket, I think he can easly help you.
  6. It was the right path to follow... I've finally reached my goal! Firestarter and Click burst examples were very helpful!
  7. With particles and emitter and tween I'm very very very close to the result that I want.
  8. Yes, the tween solution was my attempt, I've created dotnumber tweens with different alpha and a 1 - (0.1 * dotnumber) delay each other... but they ignore the duration. I've set duration to 0, 1000, 4000, 40000 and 400000 but they will run really fast (less then a second from one side of the screen to the other) and same duration. for (let i = 0; i < 6; i++) { dots.children[i].alpha = 1 - (0.1 * i); game.add.tween(dots.children[i]).to( { x: [path[0].x, path[1].x, path[2].x, path[3].x, path[4].x, path[5].x, path[6].x], y: [path[0].y, path[1].y, path[2].y, path[3].y, path[4].y, path[5].y, path[6].y] }, 1000, "Linear", true, i * 100, 0, false); }
  9. Mmm... Typescript doesn't like game.math.(any)Interpolation. I have to show the winning line, I don't need to follow an input. 2 examples in a bigger TicTacToe with winning X to highlight: x . 0 . . x . 0 . x 0 x . . . 0 x . x . 0 . x . . 0 . x . . . . . x 0 . . . . 0 . . 0 . x . . 0 . . I've the x and y of the center of each image (x in this example) to highlight. The effect that I want is a line with this dot, the alpha will be 1 - (0.1 * dotnumber) for example. How could I reach this result?
  10. Good morning! I've a question about trails. I've an image of a point who's moving from left to right (not always with the shortest track) and I would like to let him have a trail. Is there in Phaser a better (and surely smart) way to do that instead of create multiple tweens for multiple identical image object with identical track who have different alpha? Thanks!
  11. Fenopiù

    Input box

    Like for Phaser, I've put the definition file in the same folder of the js file. What I've done is all in the previous comment.
  12. Fenopiù

    Input box

    It doesn't event start in Phaser 2.6.2 with Typescript :-( I've put phaser-input.js and phaser-input.d.ts in mypath/paser-input, then I call Phaser and phaser-input in my index.html <head> <script src="mypath/phaser/phaser.js"></script> <script src="mypath/phaser-input/phaser-input.js"></script> </head> When I activate the plugin: game.add.plugin(PhaserInput.Plugin); Visual Studio returns: (TS) Argument type 'typeof Plugin' cannot be assigned to a parameter type 'Plugin'. In type 'typeof Plugin' there is no 'active' property.
  13. Fenopiù

    Input box

    Is still updated? I've saw a lot of old issues so I've supposed is no more updated.
  14. Fenopiù

    Input box

    Hi all! I didn't find a function to create and manage input boxes in Phaser... I'm blind or it doen't exist for real?
  15. With Phaser 2.6.2 I've stable 60FPS on good smartphone and 55FPS with older device (iPhone 5C, a 2014 Huaweii low-end, a 2009 Mac book pro).
  16. player.body.velocity.x = 0; player.body.velocity.y = 0; if (cursors.up.isDown) { personaggio.body.velocity.y = -3000; } else if (cursors.down.isDown) { player.body.velocity.y = 3000; }if (cursors.left.isDown) { personaggio.body.velocity.x = -3000; } else if (cursors.right.isDown) { player.body.velocity.x = 3000; }
  17. If he destroy the sprites he can't revive them anymore.
  18. After a while I've moved to crop all images outside the rectangle instead of mask them.
  19. I'm trying to understand how to setup my tsconfig configuration to work properly with Visual studio community 2017 and my project. The structur of the project is: root debug platformA fileX tsconfig.caseA.json platformB fileX tsconfig.caseB.json platformC fileX tsconfig.caseC.json release platformA fileX tsconfig.caseA.json platformB fileX tsconfig.caseB.json platformC fileX tsconfig.caseC.json tsconfig.json How can I do to let Visual studio understand what fileX read and give me his intellisense? How can I tell him to compile tsconfig.json and then just the correct one of the other three tsconfig? I've looked at the documentation https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#configuration-inheritance-with-extends but I didn't understand how to do that. Can anyone help me, please? Thanks!
  20. Never working with setBounds yet... but 0, 0 is top left corner, have you tryed game.world.setBounds(10, 10, 400, 400)?
  21. Good morning everyones! I'm using Phaser 2.6.2. I'm working to play a sound sequence, I've didn't find a queue option in Phaser sound manager, so I've tried to build a basic one by myself. I've 1 to 5 sounds to play one after one to make a single sound if the player has reached 1 to 5 goals. I'v all the sounds preloaded in an array. When I call: console.log(sound[i].isPlaying); is always true. When I call: console.log(sound[i].currentTime); is always 0. Why? How can I make it works?
  22. Hi all! How can I get the image size of an image in an atlas? getImageSize wants just a string... but tu reach the image it have to know both atlas key and image key.
  23. For Visual studio 2017 community edition you have to use this exension: TypeScript HTML Application Template (it's a really outdated template but if you start your project with it, Phaser works). HTMLTypeScriptApp.vsix