audiochorusfilter.pan 平衡调整

2015-1-3 13:47| 发布者: 杨炎| 查看: 2382| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: audiosource.pan 平衡调整varpan: floatdescription描述sets a channels pan position linearly. only works for 2d clips.设置一个通道平衡调整线性位置,只工作于2d剪辑。-1.0 to 1.0. -1.0 is full left. 0.0 is ...

audiosource.pan 平衡调整

varpan: float

description描述

sets a channels pan position linearly. only works for 2d clips.

设置一个通道平衡调整线性位置,只工作于2d剪辑。

-1.0 to 1.0. -1.0 is full left. 0.0 is center. 1.0 is full right. only sounds that are mono or stereo can be panned. multichannel sounds (ie >2 channels) cannot be panned.

-1.0到1.0。-1.0是最左,0.0为中间,1.0是最右。只有声音是单声道或立体声可以被调整。多声道声音(大于2声道)不能被调整。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

public bool panonleft = false;

void update() {

if (input.getkeydown(keycode.space))

if (panonleft) {

panonleft = false;

audio.pan = 1;

} else {

panonleft = true;

audio.pan = -1;

}

}

void awake() {

audio.pan = 1;

}

}

// switches sound from left to right everytime the user presses space

//在用户每次按下空格键,从左到右声道切换声音

var panonleft = false;

audio.pan = 1;

function update() {

if(input.getkeydown(keycode.space)) {

if(panonleft) {

panonleft = false;

audio.pan = 1;

} else {

panonleft = true;

audio.pan = -1;

}

}

}

相关阅读

文章点评
相关文章