• Content Count

  • Joined

  • Last visited

  1. You are the Large Hadron Collider, but are you the best Hadron Collider? --- This is my first complete game. It's far from perfect, but I put a good deal of work into it so I hope you guys enjoy it. Any comments or impressions are welcome. Play it here on Desktop or Mobile (recommended): https://ametrine.itch.io/hadron Details: Stack: JS (ES6) + Webpack + Babel Built with Phaser 2 (started development before v3 release) Source repo: https://github.com/JHAvrick/hadron
  2. You may want to check out a more recent version of the docs. You could use the setHealth method, or simply set the "health" property directly. var sprite = game.add.sprite(0,0, 'texture'); sprite.health = 50; sprite.setHealth(50);
  3. What you've posted seems to work fine in the sandbox, but without more context its hard to say what the problem might be. If you post a more complete sample of your code I can take a look.
  4. Not sure if this is what you're looking for but perhaps either the alive or exists flag.
  5. https://phaser.io/sandbox/edit/ydvRRdmb Your code appears to be working in the Phaser sandbox. Even if your texture was unavailable the emitter should still use the default texture "_missing", which is just a green square (as in the sandbox example). The "on" property of the emitter probably only reads as true if it is actively releasing particles, which yours is not because it is set to burst/explode. If I had to guess I'd say you might have a context issue, but that's just a shot in the dark. If you post the entire state including your create function I might be able to provide some better insights.
  6. What version of Phaser are you using? I've had problems with shader performance when using Phaser-ce, as opposed to the latest official build. Using Phaser 2.6.2 (Kore Springs) I am getting consistently high FPS with multiple filters. Might be something to consider.