Time.timeScale时间缩放-创新互联

static var timeScale : floatTime.timeScale时间
缩放

Description描述

成都创新互联从2013年成立,是专业互联网技术服务公司,拥有项目成都网站设计、网站制作网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元八宿做网站,已为上家服务,为八宿各地企业和个人服务,联系电话:028-86922220

The scale at which the time is passing. This can be used for slow motion effects.

传递时间的缩放。这可以用于减慢运动效果。

When timeScale is 1.0 the time is passing as fast as realtime. When timeScale is 0.5 the time is passing 2x slower than realtime.

当timeScale传递时间1.0时和实时时间一样快。当timeScale传递时间0.5时比实时时间慢一半。

When timeScale is set to zero the game is basically paused if all your functions are frame rate independent.

当timeScale传递时间为0时游戏基本上暂停了,如果你的所有函数是和帧速率无关的。

Except for realtimeSinceStartup, timeScale affects all the time and delta time measuring variables of the Time class.

除了realtimeSinceStartup,timeScale影响所有时间和增量时间基于Time类的变量。

If you lower timeScale it is recommended to also lower Time.fixedDeltaTime by the same amount.

如果降低timeScale,建议也降低Time.fixedDeltaTime同样的数值。

FixedUpdate functions will not be called when timeScale is set to zero.

当timescale设置为0时,FixedUpdate函数将不会被调用。

// Toggles the time scale between 1 and 0.7
// whenever the user hits the Fire1 button.
//切换时间缩放在1-0.7之间,每当用户点击Fire1按钮。function Update () {
if (Input.GetButtonDown ("Fire1")) {
if (Time.timeScale == 1.0)
        Time.timeScale= 0.7;
else
        Time.timeScale= 1.0;
// Adjust fixed delta time according to timescale  // The fixed delta time will now be 0.02 frames per real-time second  //根据timescale调整固定增量时间。    Time.fixedDeltaTime = 0.02 * Time.timeScale;
    }
}

当前题目:Time.timeScale时间缩放-创新互联
URL标题:http://lszwz.com/article/cddjso.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款