Jump to content

add a class extends from sprite to a sprite


odelia
 Share

Recommended Posts

I have a class that extends from sprite. I want to add it to another sprite

obj = 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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...