• 工具类


    1. 时间:

        Time.time:            从游戏开始时计时,表示截止目前共运行的游戏时间
        Time.deltaTime:    获取update中完成上一帧所消耗的时间
        Time.fixedTime:     FixedUpdate()方法中固定消耗时间的总和
        Time.fixedDeltaTime:  固定更新上一帧所消耗的时间

    2. 等待

         yield return new WaitForSeconds(2);   -->暂停2秒

        一定要将该方法的返回类型修改为IEnumerator 类型

        private IEnumerator wait()
        {
            yield return new WaitForSeconds(2);
        }

    3. 随机

    Random

    4. 数学

         Mathf

  • 相关阅读:
    python
    python
    python
    python
    python
    python
    python
    python
    [ThinkPHP] 从一个表中获得栏目对应的ID,从另一个表获得属于这些栏目的文章
    [thinkPHP] buildSql可以查看tp CURD操作对应的SQL
  • 原文地址:https://www.cnblogs.com/zhangweia/p/3648798.html
Copyright © 2020-2023  润新知