当前位置: 首页>>代码示例>>C#>>正文


C# EventInstance.setVolume方法代码示例

本文整理汇总了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;
        }
    }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:60,代码来源:AtributaSetinha.cs

示例2: Start

 void Start()
 {
     StartCoroutine("GO");
     volInicio = FMODUnity.RuntimeManager.CreateInstance(parede);
     volInicio.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
     volInicio.start();
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:7,代码来源:GranitePresas.cs

示例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);
            }
        }
    }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:30,代码来源:Pacman.cs

示例4: Start

    void Start()
    {
        vol = FMODUnity.RuntimeManager.CreateInstance(musica1);
        vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
        vol.start();

    }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:7,代码来源:ManagerCamera.cs

示例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();
        }
    }
开发者ID:slb1988,项目名称:FmodDemo,代码行数:32,代码来源:Test.cs

示例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;
        }
    }
开发者ID:slb1988,项目名称:FmodDemo,代码行数:31,代码来源:Test.cs

示例7: Start

 void Start()
 {
     StartCoroutine("GO");
     tiroInstance = FMODUnity.RuntimeManager.CreateInstance(tiro);
     tiroInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
     tiroInstance.start();
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:7,代码来源:TiroEnemy.cs

示例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();
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:8,代码来源:Agarra.cs

示例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();
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:10,代码来源:Pacman.cs

示例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);

    }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:10,代码来源:SetButtonSkill.cs

示例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();
        }
    }
开发者ID:Fensal,项目名称:FairJudgementBac,代码行数:13,代码来源:FMODTest.cs

示例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();
                 }
             }
         }
     }        
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:50,代码来源:SetGifts.cs

示例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);
     }
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:14,代码来源:Pacman.cs

示例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");
			}
		}
	}
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:15,代码来源:Agarra.cs

示例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);
         }
     
 }
开发者ID:mutatis,项目名称:WereWolfTheApocalipse,代码行数:15,代码来源:EletrocuteDon.cs


注:本文中的FMOD.Studio.EventInstance.setVolume方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。