📜  每秒更新一次的统一调用函数 - C# 代码示例

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

代码示例1
float elapsedTime;
float timeLimit = 0.1f;

private void Update()
{
    elapsedTime += Time.deltaTime;
    if (elapsedTime >= timeLimit)
    {
        elapsedTime = 0;
        //Rest of your code or function call goes here
    }
}