Hi!
I'm new to this forum. I've searched a lot, but couldn't find a way to fix my issue.
What I'm trying to do is to override destroy method of the Sprite class.
Here's a code, that I use (TypeScript):
const destroySprite = Sprite.prototype.destroy; console.log(PIXI.Sprite.prototype, PIXI.Sprite, Sprite.prototype, Sprite, PIXI); Sprite.prototype.destroy = function (options: any) { // doing some extra logic destroySprite.call(this, options); };
But when I debug the application - I see that I can only step into this overridden method from the derived objects (like Text, TilingSprite etc.).
Pixi's version in the package.json is:
"pixi.js": "^5.3.8",
Also I use webpack 5 for modules bundling. I have some suspicion that it may be the source of problems.
And there's a result console.log, that I've added to the code snippet above:
I would be very thankful if someone could give me an advise on how that issue can be fixed.
Thanks in advance.