📜  unity deltatime - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:01.081000             🧑  作者: Mango

代码示例1
using UnityEngine;
// Rotate around the z axis at a constant speed
public class ConstantRotation : MonoBehaviour
{
    public float degreesPerSecond = 2.0f;
    void Update()
    {
        transform.Rotate(0, 0, degreesPerSecond * Time.deltaTime);
    }
}