using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class CountDW : MonoBehaviour { Text txt; public static float wTime = 3f; void Start() { txt = GetComponent<Text>(); } void Update() { wTime -= 1f * Time.deltaTime; if (wTime < 0) wTime = 0; txt.text = Mathf.Round(wTime) + "์ดˆ ํ›„ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค"; } }



๋‹ค๋ฅธ ํด๋ž˜์Šค์—์„  ๋‹คย ๊ดœ์ฐฎ์€๋ฐ, ๋”ฑ ์ด ํด๋ž˜์Šค๋งŒ ์ด์ƒํ•˜๊ฒŒ deltaTime๋„ฃ์–ด๋„ 0.5์ดˆ๋‹น 1์ดˆ ํ๋ฅด๋Š” ๋А๋‚Œ.