I’m trying to create a Matter Sprite from a Phaser Container. This is pretty straightforward using this.matter.add.gameObject(phaserContainer)
, however I’d like to do it using its own class.
When calling super()
on a Phaser.Physics.Matter.Sprite
class, I am unable to pass in a Phaser Group as it only supports a single texture.
Below is my ideal outcome.
const player = new Player() // extends Phaser.Physics.Matter.Sprite
Inside this player is a Phaser Container of several different game objects.