本文整理汇总了C#中FMOD.Studio.EventInstance.setParameterValue方法的典型用法代码示例。如果您正苦于以下问题:C# EventInstance.setParameterValue方法的具体用法?C# EventInstance.setParameterValue怎么用?C# EventInstance.setParameterValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FMOD.Studio.EventInstance
的用法示例。
在下文中一共展示了EventInstance.setParameterValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
theSound = FMODUnity.RuntimeManager.CreateInstance(soundEvent);
// a bunch of default vaiables which trick fmod into looping
theSound.setParameterValue("Distance", 0.0f);
theSound.setParameterValue("Direction", 0.0f);
}
示例2: OnMouseDown
void OnMouseDown()
{
if (playFlag)
{
playFlag = false;
instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
instance.release();
instance = null;
}
else
{
if (instance != null)
{
//instance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
instance.release();
}
instance = FMOD_StudioSystem.instance.GetEvent(path);
if (instance != null)
{
var attributes = FMOD.Studio.UnityUtil.to3DAttributes(position);
ERRCHECK(instance.set3DAttributes(attributes));
ERRCHECK(instance.setVolume(volume));
instance.setParameterValue("Surface", SurfaceValue);
instance.start();
}
playFlag = true;
}
}
示例3: Start
// Use this for initialization
void Start () {
cachedRigidBody = GetComponent<Rigidbody>();
openSound = FMODUnity.RuntimeManager.CreateInstance(openEvent);
closeSound = FMODUnity.RuntimeManager.CreateInstance(closeEvent);
openSound.setParameterValue("Distance", 0.0f);
closeSound.setParameterValue("Distance", 0.0f);
}
示例4: Start
// Use this for initialization
void Start () {
breathSound = FMODUnity.RuntimeManager.CreateInstance(breathEvent);
breathSound.setParameterValue("stamina", 1.0f);
breathSound.start();
heartbeatSound = FMODUnity.RuntimeManager.CreateInstance(heartbeatEvent);
heartbeatSound.setParameterValue("stamina", 1.0f);
heartbeatSound.start();
}
示例5: Start
void Start()
{
fmodevent = FMOD_StudioSystem.instance.GetEvent("event:/music/music");
if (fmodevent != null)
{
fmodevent.setVolume(1.0f);
fmodevent.setParameterValue("music_trans", 0.0f);
fmodevent.start();
}
}
示例6: Start
// Use this for initialization
void Start () {
cachedRigidBody = GetComponent<Rigidbody>();
yakAliveSound = FMODUnity.RuntimeManager.CreateInstance(yakAliveEvent);
yakAliveSound.setParameterValue("Distance", 0.0f);
yakAliveSound.start();
yakDeathSound = FMODUnity.RuntimeManager.CreateInstance(yakDeathEvent);
yakRunAway = new YakRunAway(this, runAwayStepSize);
yakFollowWaypoints = new YakFollowWaypoints(this);
agent = GetComponent<NavMeshAgent>();
this.setFollowWaypoints();
}
示例7: Awake
#endregion
public bool intro;
void Awake()
{
originalPosition = Camera.main.transform.position;
firstBison = true;
if (Instance == null)Instance = this;
else
{
if (this != Instance)
Destroy(this.gameObject);
}
StartCoroutine(SpawnAnimal());
music = RuntimeManager.CreateInstance ("event:/Music");
music.start();
music.setParameterValue("Tension", 0);
countdown = RuntimeManager.CreateInstance("event:/Sounds/Level_Select_Countdown");
示例8: InitStormSndEvt
void InitStormSndEvt() {
stormSoundEvt = FMODUnity.RuntimeManager.CreateInstance("event:/ocean");
stormSoundEvt.setParameterValue("StormLevel", weatherFade);
stormSoundEvt.start();
}