0

I make a catching to drops game but I should draw the users score on top left side of the screen. I use this code:

private SpriteBatch sayfa;
sayfa.begin();
scoreboard.draw(sayfa, score, 10,10);
sayfa.end();

But they aren't work because of you can only use string on scoreborad.draw method. How can I solve them.

Alex
  • 21,273
  • 10
  • 61
  • 73

1 Answers1

0

Depends on what type score is, but this piece of code should work regardless of what primitve type score is (I'm assuming its primitive):

    String.valueOf(score);