1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
public float _time;
public Text _timerText;
void Time(){
_time -= Time.deltaTime;
int minute = (int)_time / 60;
int second = (int)_time - (minute*60);
int second1 = second / 10;
int second2 = second % 10;
_timerText.text =
(minute.ToString() + " : " + second1.ToString() + second2.ToString());
}
| cs |
Unity UI 텍스트를 이용함.
댓글
댓글 쓰기