Jump to content

Score: from points to Stars sprite


Recommended Posts

Hi all,

I'm newbie, I'm developing my 1st game (number identification for children) using phaser framework.

In this game the Numbers are following down, and the player (a child) clicks certain numbers to earn points (1 point for each correct click/ tap), there are total 10 points. At the moment, I'm able to display the score (points) in term of number, i.e. 1, 2, 3 .. I dont want to show the number, I want to show the stars instead of number (i.e. 1 star for 1 point, 2 stars for 2 points, ....up to 10 stars). I created spritesheet which contains 10 images (i.e. 1 star, 2 stars, ...10 stars).

This is my function:

    clickNamba: function(namba){
        namba._score += 1;


How can I make it happen? Is there anyone has done something similar to this?

Thanks in advance.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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