hyspanux Posted February 20, 2014 Share Posted February 20, 2014 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 More sharing options...
rich Posted February 20, 2014 Share Posted February 20, 2014 It is valid but for some reason missing from the defs file - you can edit it and add it in though! Link to comment Share on other sites More sharing options...
hyspanux Posted February 21, 2014 Author Share Posted February 21, 2014 Thanks, thats resolved the problem, Link to comment Share on other sites More sharing options...
Recommended Posts