• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Studio.EventInstance类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



EventInstance类属于FMOD.Studio命名空间,在下文中一共展示了EventInstance类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Awake

    void Awake()
    {
        if (Instance == null) Instance = this;
        else
        {
            if (this != Instance)
                Destroy(this.gameObject);
        }

        pickup = RuntimeManager.CreateInstance("event:/Sounds/Players/Pickup_sound");
        drop = RuntimeManager.CreateInstance("event:/Sounds/Players/Drop_sound");


        diePlayers[0] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player1_Die");
        diePlayers[1] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player2_Die");
        diePlayers[2] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player3_Die");
        diePlayers[3] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player4_Die");

        
        pickupPlayers[0] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player1_Pickup");
        pickupPlayers[1] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player2_Pickup");
        pickupPlayers[2] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player3_Pickup");
        pickupPlayers[3] = RuntimeManager.CreateInstance("event:/Sounds/Players/Player4_Pickup");

        playerready[0] = RuntimeManager.CreateInstance("event:/Sounds/Animals/Announcer/Player 1");
        playerready[1] = RuntimeManager.CreateInstance("event:/Sounds/Animals/Announcer/Player 2");
        playerready[2] = RuntimeManager.CreateInstance("event:/Sounds/Animals/Announcer/Player 3");
        playerready[3] = RuntimeManager.CreateInstance("event:/Sounds/Animals/Announcer/Player 4");


        //diePlayers[3].start();
    }
开发者ID:TimHaerkens,项目名称:GGJ16,代码行数:32,代码来源:AudioManager.cs


示例2: Start

	void Start () 
	{
		collider.isTrigger = true;
		m_PlayerName = Camera.main.transform.parent.gameObject.name;
		m_MusicManager = GameObject.FindObjectOfType<MusicManager>() as MusicManager;
		m_Event = m_MusicManager.GetEvent;
	}
开发者ID:jonwa,项目名称:Project-Alix,代码行数:7,代码来源:MusicTrigger.cs


示例3: InitMusic

 private void InitMusic()
 {
     eMusic = FMODUtility.GetEvent(path);
     pMood = FMODUtility.GetParameter(eMusic, MOOD_PARAMETER);
     pState = FMODUtility.GetParameter(eMusic, STATE_PARAMETER);
     pTrack = FMODUtility.GetParameter(eMusic, TRACK_PARAMETER);
 }
开发者ID:johannes-qvarford,项目名称:LunchLadySimulator,代码行数:7,代码来源:MusicPlayer.cs


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


示例5: Awake

    void Awake()
    {
        //FMOD
        pickupFX = RuntimeManager.CreateInstance("event:/Sounds/Players/Pickup_sound");
        dropFX = RuntimeManager.CreateInstance("event:/Sounds/Players/Drop_sound");

        if(tag=="Animal1")
        {
            pickup = RuntimeManager.CreateInstance("event:/Sounds/Animals/Chicken_Pickup");
            die = RuntimeManager.CreateInstance("event:/Sounds/Animals/Chicken_Die");
        }
        if (tag == "Animal2")
        {
            pickup = RuntimeManager.CreateInstance("event:/Sounds/Animals/Pig_Pickup");
            die = RuntimeManager.CreateInstance("event:/Sounds/Animals/Pig_Die");
        }
        if (tag == "Animal3")
        {
            pickup = RuntimeManager.CreateInstance("event:/Sounds/Animals/Bison_Pickup");
            die = RuntimeManager.CreateInstance("event:/Sounds/Animals/Bison_Die");
        }


        hole = GameObject.Find("hole");
        originRotation = transform.rotation;
        spawn = true;
        StartCoroutine(WiggleNum());
        StartCoroutine(ChooseDestination());
    }
开发者ID:TimHaerkens,项目名称:GGJ16,代码行数:29,代码来源:Animal.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

	// 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);
	}
开发者ID:SamDavies,项目名称:GameDesignStudio,代码行数:8,代码来源:Teleport.cs


示例8: Start

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

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


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


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


示例11: Start

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


示例12: Start

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


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


示例14: Start

 // Use this for initialization
 void Start()
 {
     //connect FMOD events and instances to variables
     example = FMOD_StudioSystem.instance.GetEvent ("event:/Pickup");
     example.getParameter ("Type", out examplePara);
     example.getParameter ("Volume", out examplePara2);
 }
开发者ID:alextalvan,项目名称:Ships2,代码行数:8,代码来源:FMODTest.cs


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


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


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


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


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


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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FOnline.Critter类代码示例发布时间:2022-05-24
下一篇:
C# FMOD.VECTOR类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap