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


C# EventInstance.setCallback方法代码示例

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


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

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

示例2: Start

	// Use this for initialization
	void Start () {

		musicEv = FMODUnity.RuntimeManager.CreateInstance (Catalogue.getMusic());
		musicEv.getParameter (enemyCount, out enemyCountPa);
		musicEv.getParameter (speed, out speedPa);
		musicEv.getParameter (state, out statePa);

		previousFrameTime = Time.time;
		lastReportedPlayPosition = 0;
		musicEv.start ();
		enemyCountChange (3);
		statePa.setValue (1);
		speedPa.setValue (3);
		beatExecutor = GetComponent<BeatExecutor> ();
		cb = new FMOD.Studio.EVENT_CALLBACK(onBeatWrapper);
		musicEv.setCallback (cb, FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_BEAT | FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_MARKER);

	}
开发者ID:frugs,项目名称:RitualRhythm,代码行数:19,代码来源:Sound.cs

示例3: Start

    // Use this for initialization
    void Start()
    {
        //distToGround = GetComponent<Collider> ().bounds.size.y - GetComponent<Collider>();

        //start music
        Track4Event = FMODUnity.RuntimeManager.CreateInstance(track4);
        //Track4Event.start();

        Track1Event = FMODUnity.RuntimeManager.CreateInstance(drums);
        cb = new FMOD.Studio.EVENT_CALLBACK(StudioEventCallback);
        Track1Event.setCallback(cb, FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_MARKER | FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_BEAT);
        //Track1Event.start();

        Track2Event = FMODUnity.RuntimeManager.CreateInstance(chords);
        //Track2Event.start();

        Track3Event = FMODUnity.RuntimeManager.CreateInstance(track3);
        //Track3Event.start();

        myOneShot = FMODUnity.RuntimeManager.CreateInstance(BreatheIn1);

        beatOn = false;
    }
开发者ID:kendobi,项目名称:Entropy_V5,代码行数:24,代码来源:BreathingMusic.cs

示例4: Start

    // Use this for initialization
    void Start()
    {
        //distToGround = GetComponent<Collider> ().bounds.size.y - GetComponent<Collider>();

        //start music
        Track4Event = FMODUnity.RuntimeManager.CreateInstance(track4);
        Track4Event.start();

        Track1Event = FMODUnity.RuntimeManager.CreateInstance(drums);
        cb = new FMOD.Studio.EVENT_CALLBACK(StudioEventCallback);
        Track1Event.setCallback(cb, FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_MARKER | FMOD.Studio.EVENT_CALLBACK_TYPE.TIMELINE_BEAT);
        Track1Event.start();

        Track2Event = FMODUnity.RuntimeManager.CreateInstance(chords);
        Track2Event.start();

        Track3Event = FMODUnity.RuntimeManager.CreateInstance(track3);
        Track3Event.start();

        myOneShot = FMODUnity.RuntimeManager.CreateInstance(oneShot);

        //setup parameters
        /*Track1Event.getParameter("Track1Vol", out track1VolParam);
        track1VolParam.setValue (0);

        Track2Event.getParameter("Track1Vol", out track2VolParam);
        track2VolParam.setValue (0);

        Track3Event.getParameter("Track1Vol", out track3VolParam);
        track3VolParam.setValue (0);

        Track4Event.getParameter("Track1Vol", out track4VolParam);
        track4VolParam.setValue (0);

        soundSystem.getParameter("Track5Vol", out track5VolParam);
        track5VolParam.setValue (0);
        soundSystem.getParameter("Track6Vol", out track6VolParam);
        track6VolParam.setValue (0);
        soundSystem.getParameter("Track7Vol", out track7VolParam);
        track7VolParam.setValue (0);
        soundSystem.getParameter("Track8Vol", out track8VolParam);
        track8VolParam.setValue (0);
        soundSystem.getParameter("Track9Vol", out track9VolParam);
        track9VolParam.setValue (0);*/

        beatOn = false;
    }
开发者ID:kendobi,项目名称:Entropy_V5,代码行数:48,代码来源:Music.cs


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