private void setProgress(int lastOpenedScenarioNo) { float ratio = lastOpenedScenarioNo / (float)Def.MAX_SCENARIO; int percent = Mathf.FloorToInt(ratio * 100); ProgressPanel.SetValue(percent, VALUE_FORMAT); }
private void setFeeling(int feeling) { float ratio = feeling / (float)Def.MAX_FEELING; int percent = Mathf.FloorToInt(ratio * 100); FeelingPanel.SetValue(percent, VALUE_FORMAT); }