
DeltaTime
Tutorial
Beginner
+10XP
5 mins
(33)
Unity Technologies

델타 시간이란 무엇이며, 게임에서 어떻게 델타 시간을 사용해 값을 매끄럽게 변경하고 해석할 수 있는지 알아봅니다.
이 튜토리얼은 스크립팅의 기초 프로젝트에 포함되어 있습니다.
이전: GetComponent
다음: 데이터 유형
Languages available:
1. DeltaTime
UsingDeltaTimes
using UnityEngine;
using System.Collections;
public class UsingDeltaTime : MonoBehaviour
{
public float speed = 8f;
public float countdown = 3.0f;
void Update ()
{
countdown -= Time.deltaTime;
if(countdown <= 0.0f)
light.enabled = true;
if(Input.GetKey(KeyCode.RightArrow))
transform.position += new Vector3(speed * Time.deltaTime, 0.0f, 0.0f);
}
}