AudioChorusFilter.wetMix3 效果声混合3

var wetMix3 : float

Description描述

Volume of 3rd chorus tap. This tap is 90 degrees out of phase of the second tap. 0.0 to 1.0. Default = 0.5.

第三个和声节拍的音量。这个节拍是第二个节拍的相位90度输出。0.0~1.0,默认=0.5。

其实就是,调整已加入效果的声音信号的比例。

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	void Update() {

		GetComponent<AudioChorusFilter>().wetMix1 = Mathf.Sin(Time.time) * 0.5F + 0.5F;

		GetComponent<AudioChorusFilter>().wetMix2 = Mathf.Cos(Time.time) * 0.5F + 0.5F;

		GetComponent<AudioChorusFilter>().wetMix3 = Random.Range(0.0F, 1.0F);

	}

}
// Produce random mixes with the Chorus filter.

//用合声滤波器,产生随机混合

@script RequireComponent(AudioSource)

@script RequireComponent(AudioChorusFilter)



function Update() {

	GetComponent(AudioChorusFilter).wetMix1 = Mathf.Sin(Time.time)*0.5 + 0.5;

	GetComponent(AudioChorusFilter).wetMix2 = Mathf.Cos(Time.time)*0.5 + 0.5;

	GetComponent(AudioChorusFilter).wetMix3 = Random.Range(0.0,1.0);;

}
Page last updated: 2011-1-11