Jump to content

Bitmap Text update overlaying over old text, rather than replacing


Recommended Posts

Hi all,

I'm trying to create a coin counter in my game, using a bitmap font. Everything displays fine, and the counter works, however when a player collects a new coin, rather than replacing the '0' with a '1', it shows a '1', but underneath you can still see a '0' visibly. I've tried several work around methods, including even doing an if statement checking how many coins and replacing it with plain text rather than replying on the var count, and using coinText.updateText();. Does anyone have any ideas? I'll leave my code sample below.


var crystalCount = 0;
var coinText;

//Skip down to the update section

coinText = this.game.add.bitmapText(20, 10, 'carrier_command',  "Crystals:" + crystalCount, 12);



Link to comment
Share on other sites


  • Recently Browsing   0 members

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