zcstover Posted May 3, 2017 Share Posted May 3, 2017 i'm trying to make a Text object i can call and will build the correct bitmaptext var Text = function(game, target, font) { Phaser.BitmapText.call(this, game, target.x, target.y - target.height /2 , font, '', 24); this.anchor.setTo(0.5); console.log(this) } /// //so i can do something like this this.nameDisplay = new Text(game, this, 'font:default'); but it gave me an error that this.updateText is not a function, so i added Text.prototype.updateText = function() { } under the text function, but now it says 'Cannot read property "PhysicsBody" of undefined' Link to comment Share on other sites More sharing options...
zcstover Posted May 4, 2017 Author Share Posted May 4, 2017 bump Link to comment Share on other sites More sharing options...
zcstover Posted May 4, 2017 Author Share Posted May 4, 2017 fixed the physics body problem, needed a constructor, but now it says it can't read 'baseTexture' Link to comment Share on other sites More sharing options...
Recommended Posts