Jump to content

BitmapText.setText


hyspanux
 Share

Recommended Posts

Hi all,

 

I'm new at phaser and TypeScript.  I'm starting to use it following the examples.

I try to change the text of a bitmapText object but setText function is not defined. 

I looked for it in the .d.js but it wasnt there.

 

my code is like ..

export class MainMenu extends Phaser.State
{
 
        fntDesyrel :Phaser.BitmapText;        
 
        create()
       {
            this.fntDesyrel = this.game.add.bitmapText(28, 148, "PHASER", { font: '94px Desyrel', align: 'center' });
        }
 
        newText(_t : string)
        {
            this.fntDesyrel.setText(_t); /* <- Unresolved function or method setText */
        }
}
 
 
Can anyone help me?
thanks in advance.
 
 
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...