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); }
public void loadStage() { stages = StageService.getStages(); currentStage = stages.stagesList[0]; }
// mark a level as completed to track our progress public void SetLevelCompleted(StagesList stage) { GameStages[(int)stage].Completed = true; }