Spasibo Asked:2020-11-15 02:08:36 +0000 UTC2020-11-15 02:08:36 +0000 UTC 2020-11-15 02:08:36 +0000 UTC 如何编写事件以使其在执行前延迟? 772 如何在游戏代码中编写一个事件(使用 if 和其余部分),以便在执行之前延迟 n 秒? c# 1 个回答 Voted Best Answer Andrey 2020-11-15T02:33:55Z2020-11-15T02:33:55Z 阅读协程 - 这就是你所需要的。 初始化示例: StartCorutine(MethodName()); 协程声明 Private IEnumerator MethodName { Debug.Log("Before timer started"); yield return new WaitForSeconds(10f); // Таймер на 10 секунд Debug.Log("Atfer timer finished"); }
阅读协程 - 这就是你所需要的。
初始化示例:
协程声明