Beispiel #1
0
    public static float getStageProgres(int stage, long score)
    {
        StagesList stages       = StageService.getStages();
        float      progresStage = 0;
        StageModel currectStage = stages.stagesList[stage];

        if (stage > 0)
        {
            StageModel previousStage = stages.stagesList[stage - 1];

            long normalDiff  = previousStage.maxScore - currectStage.maxScore;
            long normalScore = previousStage.maxScore - score;

            progresStage = 0.2f * normalScore / normalDiff;
        }
        else
        {
            progresStage = 0.2f * score / currectStage.maxScore;
        }

        return(progresStage);
    }
Beispiel #2
0
 public void loadStage()
 {
     stages       = StageService.getStages();
     currentStage = stages.stagesList[0];
 }
Beispiel #3
0
 // mark a level as completed to track our progress
 public void SetLevelCompleted(StagesList stage)
 {
     GameStages[(int)stage].Completed = true;
 }