Description描述
成都創(chuàng)新互聯(lián)從2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都網(wǎng)站設(shè)計、網(wǎng)站制作網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元八宿做網(wǎng)站,已為上家服務(wù),為八宿各地企業(yè)和個人服務(wù),聯(lián)系電話:028-86922220The scale at which the time is passing. This can be used for slow motion effects.
傳遞時間的縮放。這可以用于減慢運(yùn)動效果。
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.
當(dāng)timeScale傳遞時間1.0時和實(shí)時時間一樣快。當(dāng)timeScale傳遞時間0.5時比實(shí)時時間慢一半。
When timeScale is set to zero the game is basically paused if all your functions are frame rate independent.
當(dāng)timeScale傳遞時間為0時游戲基本上暫停了,如果你的所有函數(shù)是和幀速率無關(guān)的。
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.
當(dāng)timescale設(shè)置為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之間,每當(dāng)用戶點(diǎn)擊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;
}
}