找回密碼
 注冊帳號

掃一掃,訪問微社區

audiochorusfilter.pitch 音調

2015-1-3 14:17| 發布者: 楊炎| 查看: 2088| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: audiosource.pitch 音調varpitch: floatdescription描述the pitch of the audio source.音頻源的音調。c#javascriptusing unityengine;using system.collections;public class example :monobehaviour{public int st ...

audiosource.pitch 音調

varpitch: float

description描述

the pitch of the audio source.

音頻源的音調。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public int startingpitch = 4;

public int timetodecrease = 5;

void start() {

audio.pitch = startingpitch;

}

void update() {

if (audio.pitch > 0)

audio.pitch -=time.deltatime* startingpitch / timetodecrease;

}

}

// decreases the pitch in the given seconds

//在給定的秒數降低音調

var startingpitch = 4;

var timetodecrease = 5;

function start() {

audio.pitch = startingpitch;

}

function update() {

if(audio.pitch > 0)

audio.pitch -= ((time.deltatime* startingpitch) / timetodecrease);

}

相關閱讀

文章點評
相關文章
女校游泳队彩金