找回密码
 注册帐号

扫一扫,访问微社区

audiochorusfilter.pitch 音调

2015-1-3 14:17| 发布者: 杨炎| 查看: 2118| 评论: 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);

}

相关阅读

文章点评
相关文章