Sorry if this is a stupid question, I’m new to Phaser.
I was wondering if it is possible to access a parent container object from a child game object.
I have a custom Image class that gets added to a Container, and I would like to access that parent container from inside the Image class.
For example:
class CustomImage extends Phaser.GameObjects.Image {
constructor(scene, x, y) {
super(scene, x, y, "custom-image-texture");
// Access parent container, maybe something like this?
this.parent./*[whatever container methods here, maybe accessing another child]*/
}
}