Time.timeScale時間縮放-創(chuàng)新互聯(lián)

static var timeScale : floatTime.timeScale時間
縮放

Description描述

成都創(chuàng)新互聯(lián)從2013年成立,是專業(yè)互聯(lián)網(wǎng)技術服務公司,擁有項目成都網(wǎng)站設計、網(wǎng)站制作網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元八宿做網(wǎng)站,已為上家服務,為八宿各地企業(yè)和個人服務,聯(lián)系電話: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時游戲基本上暫停了,如果你的所有函數(shù)是和幀速率無關的。

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同樣的數(shù)值。

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

當timescale設置為0時,F(xiàn)ixedUpdate函數(shù)將不會被調(diào)用。

// 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  //根據(jù)timescale調(diào)整固定增量時間。    Time.fixedDeltaTime = 0.02 * Time.timeScale;
    }
}

分享名稱:Time.timeScale時間縮放-創(chuàng)新互聯(lián)
網(wǎng)頁地址:http://muchs.cn/article30/cddjso.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供建站公司、電子商務、微信公眾號、微信小程序、網(wǎng)站改版、網(wǎng)站收錄

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉載內(nèi)容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司