ceb Posted March 14, 2014 Share Posted March 14, 2014 Hi I've been practicing phaser recently but can't figure this out. The game link is below and the view source link aswell. Im trying to make all my enemies bounce off the tilemap but because im creating the enemies using a for loop this wont work enemySprite.body.setRectangle(41, 41, 0, 0); it only effects one of the enemies as you can see in the demo. Please help thanks http://justukfreebies.co.uk/games/http://justukfreebies.co.uk/games/js/main.js Link to comment Share on other sites More sharing options...
valueerror Posted March 14, 2014 Share Posted March 14, 2014 i'd try it this way ..create an enemy group.. add all enemies to the group in the for loop... set up collission with group... Link to comment Share on other sites More sharing options...
Recommended Posts