public void ShowProgress(double current, double max) { //TODO calc Gauge progress float value float progress = (float)(current / max); //hack build Gauge progress string string progressString = progress.ToString("P0"); mProgressBar.ShowGaugeBar(progress, progressString); }
public void ShowGaugeBar(double current, double max) { string progressStr = string.Format("{0} / {1}", UnitSetter.GetUnitStr(current), UnitSetter.GetUnitStr(max)); float progress = (float)(current / max); mGaugeBar.ShowGaugeBar(progress, progressStr); }
public void ShowGaugeBar(double current, double max) { mGaugeBar.gameObject.SetActive(true); string progressStr = string.Format("{0} / {1}", current, max); float progress = (float)(current / max); mGaugeBar.ShowGaugeBar(progress, progressStr); }
public void ShowProgress(double current, double max) { //TODO calc GuageBar progress float value float progress = (float)(current / max); //hack Build Gauge progress string //string progressString = progress.ToString("P0"); string progressString = string.Format("{0} / {1}", UnitBuilder.GetUnitStr(current), UnitBuilder.GetUnitStr(max)); mProgressBar.ShowGaugeBar(progress, progressString); }
public void ShowGaugeBar(double current, double max) { string progressStr = string.Format("{0}/{1}", //current.ToString("N0"), UnitSetter.GetUnitStr(current), UnitSetter.GetUnitStr(max)); //max.ToString("C0")); //"N0"는 소수점 자리가 안 보이게 함. N1~2는 소수점까지 보여줌. float progress = (float)(current / max); //string progressStr = progress.ToString("P"); mGaugeBar.ShowGaugeBar(progress, progressStr); }
public void ShowGaugeBar(double current, double max) { string progressStr = string.Format("{0}/{1}", UnitSetter.GetUnitStr(current), //current.ToString("n0"), UnitSetter.GetUnitStr(max)); //max.ToString("n0")); //"n0" 정수형태 표준 숫자 서식 문자열 float progress = (float)(current / max); //string progressStr2 = progress.ToString("P"); //float 이 0~1사이면 %표시가능 mGaugeBar.ShowGaugeBar(progress, progressStr); }
// 2019.12.12 - 함수 수정 //public void ShowProgress(float progress) //{ // mProgressBar.ShowGaugeBar(progress); //} public void ShowProgress(double current, double max) { //TODO Calculate Gauge Progress float value // currnt / max를 먼저 double형태로 계산을 하고 그 계산된 값을 flaot으로 바꾸는 작업을 해준다. // float에서 오버플로가 나면 자료형에 상관없이 infinity 무한으로 나온다. float progress = (float)(current / max); //todo Build Gauge Progress string // 표준숫자형식 문자열 string progressString = progress.ToString("P0"); //mProgressBar.ShowGaugeBar(progress); mProgressBar.ShowGaugeBar(progress, progressString); }
public void ShowProgress(double current, double max) { //TODO calc Gauge progress float value float progress = (float)(current / max); ////hack build Gauge progress string // 2019.12.19 목요일 - 코드 수정 //string progressString = progress.ToString("P0"); // 유니티 텍스트는 자간조절이 안되서 어느정도 띄어져 있는 것이 좋다. string progressString = string.Format("{0} / {1}", UnitBuilder.GetUnitStr(current), UnitBuilder.GetUnitStr(max)); mProgressBar.ShowGaugeBar(progress, progressString); }
public void ShowProgress(float progress) { mProgressBar.ShowGaugeBar(progress); }