samme

Members
  • Content count

    891
  • Joined

  • Last visited

  • Days Won

    6

samme last won the day on July 22

samme had the most liked content!

About samme

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    https://github.com/samme

Profile Information

  • Gender
  1. I think you'll have to modify Phaser.Timer#update.
  2. See Working_with_Objects#Creating_new_objects.
  3. It needs to be in update, like function update () { arrows.forEachAlive(function (arrow) { arrow.rotation = arrow.body.angle; }, this); }
  4. And you would use initialize.ts, like import * as Phaser from 'phaser-ce'; let game = new Phaser.Game(/*…*/);
  5. You can put your own typings in a folder outside app (because Brunch shouldn't watch/compile it). You can set compiler options in brunch-config or create a tsconfig.json at the project root.
  6. It may not work for sprite batches. Did you try with a group instead?
  7. sampleText.setTextBounds(0, 0, this.game.width, this.game.height);
  8. No, read width and height from game or world instead of the stage. Or just a use number constants. Also, if you're not interested in the container size you can just skip the resize callback: function init() { this.scale.scaleMode = Phaser.ScaleManager.USER_SCALE; this.scale.setUserScale(2, 2); }
  9. I think that's the alpha tween, I turned it off.
  10. Did you try spriteBatch.filters = [ overlayFilter ]; ?
  11. Are you using fixedToCamera?
  12. arrow.rotation = arrow.body.angle;
  13. I often do a fake roll with sprite.body.angularVelocity = K * (sprite.body.velocity.x + sprite.body.velocity.y); where K is some number.
  14. Use game.width/game.height or world.width/world.height. Game pixels don't change when the game is scaled.
  15. Try the body.checkCollision method then.