Jump to content

Width phaser group


lvaldivia
 Share

Recommended Posts

I have a problem using phaser 2.3, I create a lot of graphics inside a group, when I try to get the full width of all the group It only show a small number.

rects = game.add.group();var col = 0;var row = -1;for(var i=0;i<50;i++){	var rect = game.add.graphics(0,0);	rect.beginFill(Math.random()*0xFF00FF);	rect.drawRect(0,0,50,50);	rect.endFill();	col = i % 10;	if(col==0){		row++;	}	rect.x = col *(rect.width+10);	rect.y = row*(rect.height+10);	rects.add(rect);}

I used to do this with phaser 2.2.2 and It gives me the full width of the group, Am I doing something wrong? Any Help?

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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