Introduction
Click the button to add 20,000 points to your score:In this Quick Tip we’re going to learn how to create a score display. To improve the quality of our display, we’re going to do two things:
- Add commas to our score, so it reads 1,600,000 instead of 1600000. This makes it easier for the player to figure out how big his or her score is.
- Make our score transition between values, instead of changing immediately. This gives the player a sense of achievement, because he or she actually sees his score grow.
This class will only concern itself with displaying the score, not with calculating it.
Step 1: Creating Our Class
First off let’s create our class; I’ve named itScoreDisplay
: [...]Read more: Quick Tip: A Simple Score Display for Flash Games
No comments:
Post a Comment