Score and Editor
ullvieib

Is it possible to add a text sprite in the editor?

I would like to add it for viewing scores

 

All 3 Comments
ullvieib

A bit embarrassed...

Found it under Sprite tab.

But how do I update the text? Eg. in onMouseDown function?

ullvieib

Never mind. I found it. :)

 

this.score++;
this.getSprite(1).setText(this.score);
Gio

Well, I was going to reply but you were too quick :)

 

Glad you figured it out anyway. To make it nicer I'd recommend using this counter behavior.

Post a reply
Add Attachment
Submit Reply
Login to Reply