dudeperfect Posted January 8, 2015 Share Posted January 8, 2015 I have a group of boosts, and I would like to add a property for all of them. I have a method, that creates individual item:dropFruit: function() { var fruit = this.boosts.create(40, -10, 'apple'); this.physics.enable(fruit); fruit.body.gravity.y = 40; fruit.collided = false; }, then I have collision method: collisionWithBoost: function(croc, boost) { this.score += 10; boost.collided = true; }, it doesn't recognize this, even that second argument(boost) is from the boosts group. Is it possible to do thing like I tried to? Link to comment Share on other sites More sharing options...
Recommended Posts