Which class does the method setBounceY belong to?

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?

:wave:

GameObject is a base class. An Arcade Physics Group creates Phaser.Physics.Arcade.Sprite by default and that’s where setBounceY is.

Ha, thanks a lot: the link you’ve provided is from a new documentation site I wasn’t aware of.

Searching for “setBounceY” in the old documentation site was only return a match for Phaser.Physics.Arcade.Body, which is why I was confused.