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


C# EventInstance.start方法代码示例

本文整理汇总了C#中FMOD.Studio.EventInstance.start方法的典型用法代码示例。如果您正苦于以下问题:C# EventInstance.start方法的具体用法?C# EventInstance.start怎么用?C# EventInstance.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FMOD.Studio.EventInstance的用法示例。


在下文中一共展示了EventInstance.start方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: 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

示例3: Start

    // --------------------------
    // Use this for initialization
    void Start()
    {
        //FMOD

        hoverSound = FMOD_StudioSystem.instance.GetEvent("event:/Hoverboard/Ny motor");

        hoverSound.start();
        soundPlaying = true;
        if (hoverSound == null)
            Debug.Log("Laddar inte in eventet!!!");

        hoverSound.getParameter("Speed", out speedPitch);

        if (speedPitch == null)
            Debug.Log("Hittar inte variabeln!!!");

        windSound = FMOD_StudioSystem.instance.GetEvent("event:/Vind/Vind");

        windSound.start();

        if (windSound == null)
            Debug.Log("Laddar inte in wind-eventet!!!");

        windSound.getParameter("Speed", out speedVolume);

        if (speedVolume == null)
            Debug.Log("Hittar inte wind-variabeln!!!");

        impactSound = FMOD_StudioSystem.instance.GetEvent("event:/Impact/Impact1");

        if (impactSound == null)
            Debug.Log("Laddar inte in impact-eventet!!!");

        //-----------------------------
    }
开发者ID:Raful,项目名称:Hoverboard,代码行数:37,代码来源:FMOD_EngineEmitter.cs

示例4: Start

 // Use this for initialization
 void Start ()
 {
     musicSound = FMODUnity.RuntimeManager.CreateInstance(MusicEvent);
     musicSound.getParameter("Light-Dark", out musicParam);
     //musicSound.setParameterValue("Light-Dark", startAmbient);
     musicSound.start();
 }
开发者ID:delVhar,项目名称:ToilTrouble_GGJ16,代码行数:8,代码来源:SoundManager.cs

示例5: Start

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

示例6: 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

示例7: 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

示例8: Start

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

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

示例9: Start

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

示例10: Start

	void Start() {
		musicEV = FMODUnity.RuntimeManager.CreateInstance(music);
		musicEV.getParameter("Happiness", out happiness);
		musicEV.getParameter("win", out win);
		musicEV.getParameter("lose", out lose);
		musicEV.start();
		Progress();
	}
开发者ID:decentninja,项目名称:Bird-Mating-Dancy,代码行数:8,代码来源:PlayerController.cs

示例11: OnTriggerEnter

 void OnTriggerEnter()
 {
     reverb = FMODUnity.RuntimeManager.CreateInstance("event:/snapshot/" + gameObject.name);
     reverb.start();
     reverb.getParameter("reverbDistance", out reverbDistance);
     reverbDistance.setValue(0f);
     print( gameObject.name + " triggered" );
 }
开发者ID:Frampt,项目名称:ReverbZoneProject,代码行数:8,代码来源:ReverbZoneParameter.cs

示例12: Start

    void Start()
    {
        instance = FMODUnity.RuntimeManager.CreateInstance(drums);

        cb = new FMOD.Studio.EVENT_CALLBACK(StudioEventCallback);
        instance.setCallback(cb, FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_MARKER | FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_BEAT);
        instance.start();
    }
开发者ID:kendobi,项目名称:Entropy_V5,代码行数:8,代码来源:MarkerDemo.cs

示例13: 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

示例14: Start

 // Use this for initialization
 void Start()
 {
     Menu = FMOD_StudioSystem.instance.GetEvent ("event:/Menu");
     Menu.start ();
     Menu.getParameter ("OptionsMuch", out OptionsMuch);
     Menu.getParameter ("StartGame", out StartGame);
     Time.timeScale = 1.0f;
 }
开发者ID:Fishey,项目名称:Project-Indie-Game,代码行数:9,代码来源:MenuScript.cs

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


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