Sign in to follow this  

default text object function

Recommended Posts

i'm trying to make a Text object i can call and will build the correct bitmaptext

var Text = function(game, target, font) {, game, target.x,
        target.y - target.height /2 , font, '', 24);


//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'

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.