Hi guys, I’m a total Phaser beginner and I have a question concerning page 8 of the official Phaser tutorial , especially this piece of code:
stars = this.physics.add.group({key: 'star', repeat: 11, setXY: { x: 12, y: 0, stepX: 70 }});
stars.children.iterate(function (child) {
child.setBounceY(Phaser.Math.FloatBetween(0.4, 0.8));
});
According to the public documentation, stars.children is a Set of GameObject, however the GameObject class does not have a setBounceY() method.
It looks like the only class that has this method is Body, however I don’t see the relationship between GameObject and Body… what am I missing?