Jump to content

Problem with setAll


Nikow
 Share

Recommended Posts

Hi,

 

I'm trying to apply y velocity to all of children in a group, look at my code :

      shoots = game.add.physicsGroup();      shoots.physicsBodyType = Phaser.Physics.ARCADE;      shoots.enableBody = true;      shoots.setAll('anchor.x', 0.5);      shoots.setAll('anchor.y', 1);      shoots.setAll('outOfBoundsKill', true);      shoots.setAll('checkWorldBounds', true);      shoots.setAll('body.velocity.y', -400);

when i add a child with : 

shoots.create(player.x-10, player.y-50, 'blast1');

It doesn't move .... 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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