wayfinder Posted July 15, 2014 Share Posted July 15, 2014 One of the coolest new things in PIXI 1.6 are strips and ropes. I'm trying to use them in my Phaser project, but they don't have preUpdate or postUpdate methods and so Phaser throws an error. What's the way to go here? Extend sprite? I'm unsure how exactly. Any help is appreciated! Link to comment Share on other sites More sharing options...
wayfinder Posted July 15, 2014 Author Share Posted July 15, 2014 I have to admit I'm completely lost with this. Here's what I have so far:Phaser.RopeSprite = function (game, x, y, name, key, frame, points) { Phaser.Sprite.call(this, game, x, y, name); this.rope = new PIXI.Rope(PIXI.Texture.fromImage(key), points); this.rope.parent = this; this.refresh = PIXI.Rope.prototype.refresh.call(this.rope); this.updateTransform = PIXI.Rope.prototype.updateTransform.call(this.rope); this.setTexture = PIXI.Rope.prototype.setTexture.call(this.rope); }; Phaser.RopeSprite.prototype = Object.create(Phaser.Sprite.prototype);Phaser.RopeSprite.prototype.constructor = Phaser.RopeSprite;But the updateTransform of my RopeSprite is undefined What am I doing wrong? jdnichollsc 1 Link to comment Share on other sites More sharing options...
Recommended Posts