Hi Everyone,
Just wondering, how can I extend a SpineGameObject
For example, I usually create physics sprites by extending them like this:
class MySprite extends Phaser.Physics.Arcade.Sprite {...
(http://labs.phaser.io/edit.html?src=src/physics/arcade/extending%20arcade%20sprite.js)
I’m trying to do something similar with an SpineGameObject, but so far haven’t hit on the right formula yet. I assumed I could import SpineGameObject from SpinePlugin, and extend it like this:
import SpinePlugin from "../libs/phaser/SpinePlugin";
...
class MySprite extends SpinePlugin.SpineGameObject {...
… but no luck there (I’m getting an error message Super expression must either be null or a function
, which looks like it’s just a default “I’m broken” message.)
Any suggestions on what I could try? I’m trying to create an Arcade physics object from a Spine animation.
Thanks!