Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Custom params during creation of a new element in group


Michał Lipa
 Share

Recommended Posts

How I can add custom parameter of element of group. I need set that parameter during element creation. That will be string.

My group:

items = game.add.group();
items.enableBody = true;
items.physicsBodyType = Phaser.Physics.ARCADE;

 

creation of a new element:
 

//Can I add custom parameter over here? I mean during creation
items.create(new.x, new.y, 'texture');

Is there any option to set custom parameter during element creation?

 

Right now I have elements with x, y, texture but I want one more paremater with my custom string.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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