lundi 28 décembre 2015

Adding and storing a highscore

I'd like to add a highscore to my android game. I'd like to add it and store for when they return. how do I go about this? Here's the code for the frame I want it on!

lblScore.text = String(score);
gameOver.addEventListener(TouchEvent.TOUCH_TAP, End);
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; 


function End(event:TouchEvent): void {
    gotoAndPlay(1);
}

stage.removeEventListener(TouchEvent.TOUCH_TAP, End);

function refreshScores():void {
    lblScore.text = String(score);
    score++;
}

Aucun commentaire:

Enregistrer un commentaire