• Content Count

  • Joined

  • Last visited

About gwinnell

  • Rank

Contact Methods

  • Website URL
  • Twitter

Profile Information

  • Gender
    Not Telling
  • Location

Recent Profile Visitors

1095 profile views
  1. Someone has done a really shoddy job resurfacing the pavement by my house. @BristolCouncil

  2. Given the arguments put forward by @TheyTookCROS, I am now a supporter of the trailing comma in programming, also sentences,

  3. Looks good. The one feature I'd need for production work is the ability to start/stop emitters though! Edit: aaaaaand just realised new Phaser has particle functionality built-in.
  4. has come in really useful so far in my Phaser project. Big props to the developer! I've recently been trying to modify the source to it so I can see the ".visible" property of objects/groups in the Scene panel. I can't for the life of me see where the Handlebar template values are being set though. Dang. Is something missing from the repository?
  5. Sorry to resurrect an old thread. Using the below, how can I get the name of the animation that finished playing? I have multiple animations on a sprite and only want to do some behaviour with one of those animations and this event triggers for all of { console.log('animation complete'); if (is_walk_animation) { ... } }, this);Thanks!
  6. setStyle() works. It doesn't seem to be in the docs though! Thanks.
  7. Hi there! I can see all the internal values changing, but the displayed text doesn't change colour. Tried with both Canvas and WebGL renderers.
  8. Seems a bit hacky, but works like a charm! Thanks, Xeke.
  9. Hi all, Is this possible? e.g. // Create textvar t =, 10, "Hello World", { font: "16pt Arial", fill: "#FFFFFF", align: "center" });// Ideally not this because it uses internal values, and actually doesn't update the text displayed. t._style['fill'] = "#FF0000";// Perhaps something like this...!t.updateCSS({ font: "16pt Arial", fill: "#FF0000", align: "center" });Thanks!
  10. Hi all, How can I make keyboard input trigger a button's event AND affect it's visual state, almost like a simulated mouse press? I want to do something like the following: BasicGame.Game = function (game) { this.abutton = null; this.akey = null;}BasicGame.Game.prototype = { preload: function() { this.load.atlas('ui', 'assets/ui.png', 'assets/ui.json'); }, create: function () { this.abutton =, 10, 'ui', this.abuttonEvent, this, 'ui/button_over', 'ui/button_off', 'ui/button_down'); this.akey =; this.akey.onDown.add(this.abuttonEventKey, this); }, abuttonEvent: function() { // do button stuff }, abuttonEventKey: function() { // something here to change the button state/image to down and trigger the event this.abutton.doMousePress(); this.abuttonEventKey(); }}Thanks!
  11. Absolutely brilliant, Rich -- that's exactly what I was looking for! I must have missed the 'key' parameter in the docs somehow.
  12. Hi all, Using Phaser 1.1.3, how can I get an image or "sub sprite" out of an atlas without adding it to the scene? For example, this will get me a button sprite inside the ui texture atlas, but it will add it to the scene too. var ui = this.load.atlas('ui', 'assets/ui.png', 'assets/ui.json'); // preloadvar spr =, 50, 'ui', 'button_off');What I want to do is get that sprite without it adding, to use in a button. a la below, or a version of below that uses the standard string/numeric asset references. var overImg = something;var outImg = something;var downImg = something;var btn =, 0, function() {}, this, overImg, outImg, downImg);//'overImg', 'ui', 'ui/overimg'); // etc.var btn =, 0, function() {}, this, 'overImg', 'outImg', 'downImg'); Thanks!