本文整理汇总了C#中FMOD.Studio.EventInstance.setVolume方法的典型用法代码示例。如果您正苦于以下问题:C# EventInstance.setVolume方法的具体用法?C# EventInstance.setVolume怎么用?C# EventInstance.setVolume使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FMOD.Studio.EventInstance
的用法示例。
在下文中一共展示了EventInstance.setVolume方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
void Update ()
{
if (SelectPersonagem.personagem.select == meuNumero.meuNumero)
{
if (podeDpad)
{
if (tipo == 0)
{
if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetAxisRaw("DpadXP1") > 0)
{
anim.SetTrigger("Aperto");
heal = FMODUnity.RuntimeManager.CreateInstance(socoFraco);
heal.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
heal.start();
}
}
else if (tipo == 1)
{
if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetAxisRaw("DpadXP1") < 0)
{
anim.SetTrigger("Aperto");
heal = FMODUnity.RuntimeManager.CreateInstance(socoFraco);
heal.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
heal.start();
}
}
podeDpad = false;
}
}
else if (SelectPersonagem.personagem.select2 == meuNumero.meuNumero)
{
if (podeDpad2)
{
if (tipo == 0)
{
if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetAxisRaw("DpadXP2") > 0)
{
anim.SetTrigger("Aperto");
}
}
else if (tipo == 1)
{
if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetAxisRaw("DpadXP2") < 0)
{
anim.SetTrigger("Aperto");
}
}
podeDpad2 = false;
}
}
if (Input.GetAxisRaw("DpadXP1") == 0)
{
podeDpad = true;
}
if (Input.GetAxisRaw("DpadXP2") == 0)
{
podeDpad2 = true;
}
}
示例2: Start
void Start()
{
StartCoroutine("GO");
volInicio = FMODUnity.RuntimeManager.CreateInstance(parede);
volInicio.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
volInicio.start();
}
示例3: OnTriggerEnter
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Parede3")
{
temp++;
contador = 1;
StartCoroutine("GO");
}
if (other.gameObject.tag == "Enemy")
{
if (other.gameObject.GetComponent<EnemyController>().life > 0 && other.gameObject.GetComponent<EnemyController>().dano)
{
vol = FMODUnity.RuntimeManager.CreateInstance(dano);
vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
vol.start();
Dano(other.gameObject);
}
}
else if (other.gameObject.tag == "EnemyRanged")
{
if (other.gameObject.GetComponent<EnemyRanged>().life > 0 && other.gameObject.GetComponent<EnemyRanged>().dano)
{
vol = FMODUnity.RuntimeManager.CreateInstance(dano);
vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
vol.start();
Dano(other.gameObject);
}
}
}
示例4: Start
void Start()
{
vol = FMODUnity.RuntimeManager.CreateInstance(musica1);
vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
vol.start();
}
示例5: Update
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.S))
{
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.start();
}
}
if (Input.GetKeyDown(KeyCode.J))
{
instance.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
instance.release();
}
if (Input.GetKeyDown(KeyCode.L))
{
instance.stop(FMOD.Studio.STOP_MODE.ALLOWFADEOUT);
instance.release();
}
}
示例6: 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;
}
}
示例7: Start
void Start()
{
StartCoroutine("GO");
tiroInstance = FMODUnity.RuntimeManager.CreateInstance(tiro);
tiroInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
tiroInstance.start();
}
示例8: Joga
public void Joga()
{
agarraAudioInstance = FMODUnity.RuntimeManager.CreateInstance(joga);
agarraAudioInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
agarraAudioInstance.start();
enemy.GetComponent<EnemyController>().Slam(player.playerStatus.dmg, false, gameObject, 5);
End();
}
示例9: Start
void Start()
{
if(obj.GetComponent<PlayerController>().transform.localScale.x < 0)
{
vel *= -1;
}
volInicio = FMODUnity.RuntimeManager.CreateInstance(inicio);
volInicio.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
volInicio.start();
}
示例10: GO
IEnumerator GO()
{
lapisRef = FMODUnity.RuntimeManager.CreateInstance(lapis);
lapisRef.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
lapisRef.start();
yield return new WaitForSeconds(1);
gift.atributo.enabled = true;
gift.select.SetActive(false);
}
示例11: 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();
}
}
示例12: Update
void Update()
{
if (!select.activeSelf)
{
if (PlayerPrefs.GetInt(nome) == 1)
{
if (SelectPersonagem.personagem.select == meuNumero.meuNumero)
{
if ((Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Joystick1Button0)))
{
atributo.enabled = false;
select.SetActive(true);
}
}
else if (SelectPersonagem.personagem.select2 == meuNumero.meuNumero)
{
if ((Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Joystick2Button0)))
{
atributo.enabled = false;
select.SetActive(true);
}
}
}
else if (PlayerPrefs.GetInt(nome) == 0)
{
if (SelectPersonagem.personagem.select == meuNumero.meuNumero)
{
if ((Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Joystick1Button0)) && value <= PlayerPrefs.GetFloat("XP"))
{
PlayerPrefs.SetInt(nome, 1);
PlayerPrefs.SetFloat("XP", (value * -1));
lapisRef = FMODUnity.RuntimeManager.CreateInstance(lapis);
lapisRef.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
lapisRef.start();
}
}
else if ((SelectPersonagem.personagem.select2 == meuNumero.meuNumero) && value <= PlayerPrefs.GetFloat("XP"))
{
if ((Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Joystick2Button0)) && value <= PlayerPrefs.GetFloat("XP"))
{
PlayerPrefs.SetInt(nome, 1);
PlayerPrefs.SetFloat("XP", (value * -1));
lapisRef = FMODUnity.RuntimeManager.CreateInstance(lapis);
lapisRef.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
lapisRef.start();
}
}
}
}
}
示例13: Update
void Update()
{
if(contador == 0)
transform.Translate(vel, 0, 0);
if(temp == 2)
{
volInicio.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
vol = FMODUnity.RuntimeManager.CreateInstance(fim);
vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
vol.start();
Destroy(gameObject);
}
}
示例14: OnTriggerEnter
void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag == "Enemy")
{
if (!pego && !player.stun && player.isAttack && other.gameObject.GetComponent<EnemyController>().life > 0 && !other.gameObject.GetComponent<EnemyController>().slam && (player.x > 0 || player.x < 0) && !player.jump)
{
agarraAudioInstance = FMODUnity.RuntimeManager.CreateInstance(pega);
agarraAudioInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
agarraAudioInstance.start();
enemy = other.gameObject;
pego = true;
StartCoroutine ("GO");
}
}
}
示例15: Dano
void Dano(GameObject other)
{
audioInstance = FMODUnity.RuntimeManager.CreateInstance(raio);
audioInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
audioInstance.start();
if (other.gameObject.tag == "Enemy")
{
other.gameObject.GetComponent<EnemyController>().Dano(dmg, false, gameObject);
}
else if (other.gameObject.tag == "EnemyRanged")
{
other.gameObject.GetComponent<EnemyRanged>().Dano(dmg, false, gameObject);
}
}