Hi.
I have placed a player score in my game in the top-left corner, and added it to my onEnterFrame using:
text = BMTextField.new(font, tostring(score))
stage:addChild(text)
The score is incremented when my player collides with objects. However, the previous scores are left on the screen, and the new score is placed on top. Presumably, I am placing my score in the wrong place. Should I be creating the score in the Init function, and then just updating it in my onEnterFrame?
If anyone can suggest the best way to set up a scoring system I'd be very grateful.
Thanks
James
Comments
Just call the BMFont:setText() function with your new score - however I'd only update if the value changes or else you'll be wasting a lot of time re-creating objects that don't need to be created.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Cheers for the quick response.
James