Vaughan Posted February 18, 2014 Share Posted February 18, 2014 I can't seem to get this to work in the latest release -- does anyone have any advice? Link to comment Share on other sites More sharing options...
seiyria Posted February 21, 2014 Share Posted February 21, 2014 Sorry, I don't have much to add, but I was having trouble with this as well. As a temporary measure, I've given the player class a "ref" variable which just refers to the Sprite. Link to comment Share on other sites More sharing options...
george Posted February 21, 2014 Share Posted February 21, 2014 I have no problems with 1.14 or 1.2.What's your current attempt like ? My working code:class SomeSprite extends Phaser.Sprite constructor: (game, x, y, key, frame)-> super(game, x, y, key, frame) #same: Phaser.Sprite.call(@, game, x, y, key, frame)//in a phaser statecreate: -> sprite = new SomeSprite(@game, 0, 0, 'somekey') @world.add(s) //or extend a groupclass SomeGroup extends Phaser.Group constructor: (game)-> Phaser.Group.call(@, game) @init() init: -> //create a sprite @someSprite = @create(0, 0, 'key') Link to comment Share on other sites More sharing options...
Recommended Posts