/* * Generate the actual pair of the high score and the player identity. * The new pair is only saved, if a new high score is achieved. * This function is called by 'HighScoreNameLinkerGroup' by the method 'generateLinks()' to * generate all at once. */ public void generateHighScoreNameLink() { int score = 0; bool newHighScore = false; generateSaveKey(); load(); getVSscript(); if (highScoreSource == hsnSelection.valueScriptActual) { score = Mathf.RoundToInt(vs.레이어프랩스데이터); } else if (highScoreSource == hsnSelection.valueScriptMaximal) { score = Mathf.RoundToInt(vs.최대값얻기()); } else if (highScoreSource == hsnSelection.valueScriptMinimal) { score = Mathf.RoundToInt(vs.최소값얻기()); } else if (highScoreSource == hsnSelection.scoreCounter) { score = sc.getScore(); } //two cases: save the highest or the lowest value; if (highScoreSource == hsnSelection.valueScriptMinimal) { //getting new lowest value if (score < hsnPair.highScore) { newHighScore = true; } } else { //getting new highest value if (score > hsnPair.highScore) { newHighScore = true; } } if (newHighScore == true) { hsnPair.highScore = score; hsnPair.countryName = CountryNameGenerator.instance.getCountryNameText(); hsnPair.valid = true; save(); //Debug.Log ("new " + key); } else { //Debug.Log ("no " + key); } }
public void showMinMaxValue() { vs = ValueManager.나자신.첫번째피팅값가져오기(valueTyp); if (vs != null) { if (maxValueText != null) { maxValueText.text = (vs.최대값얻기() * displayMultiplier).ToString(formatter); } if (minValueText != null) { minValueText.text = (vs.최소값얻기() * displayMultiplier).ToString(formatter); } if (currentValueText != null) { currentValueText.text = (vs.레이어프랩스데이터 * displayMultiplier).ToString(formatter); } } }