odelia Posted December 1, 2015 Share Posted December 1, 2015 I have a class that extends from sprite. I want to add it to another spriteobj = new ItemBtn(this.state, xloc, yloc, item);this.menuContainer.addChild(this.game.make.sprite(xloc, yloc, obj));Can't I create a child without the image key? Can't I add a class to the sprite? Thank you. Link to comment Share on other sites More sharing options...
odelia Posted December 1, 2015 Author Share Posted December 1, 2015 I've solve this with just addChild obj = new ItemBtn(this.state, xloc, yloc, item); this.menuContainer.addChild(obj); Link to comment Share on other sites More sharing options...
Recommended Posts