
DeltaTime 関数
Tutorial
Beginner
+0XP
5 mins
(13)
Unity Technologies

Delta Time とは何ですか?ゲーム内で値を滑らかにしたり、解釈するためにどのように使用できるのでしょうか?
本チュートリアルは Beginner Scripting プロジェクトに含まれています。
前回のチュートリアルは:GetComponent
次のチュートリアルは:Data Types
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);
}
}