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


C# EventInstance.setParameterValue方法代码示例

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


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

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

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

示例3: Start

	// Use this for initialization
	void Start () {
		cachedRigidBody = GetComponent<Rigidbody>();
		openSound = FMODUnity.RuntimeManager.CreateInstance(openEvent);
		closeSound = FMODUnity.RuntimeManager.CreateInstance(closeEvent);

		openSound.setParameterValue("Distance", 0.0f);
		closeSound.setParameterValue("Distance", 0.0f);
	}
开发者ID:SamDavies,项目名称:GameDesignStudio,代码行数:9,代码来源:PlayDoorSound.cs

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

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

示例6: Start

	// Use this for initialization
	void Start () {

		cachedRigidBody = GetComponent<Rigidbody>();
		yakAliveSound = FMODUnity.RuntimeManager.CreateInstance(yakAliveEvent);

		yakAliveSound.setParameterValue("Distance", 0.0f);
		yakAliveSound.start();

		yakDeathSound = FMODUnity.RuntimeManager.CreateInstance(yakDeathEvent);

		yakRunAway = new YakRunAway(this, runAwayStepSize);
		yakFollowWaypoints = new YakFollowWaypoints(this);

		agent = GetComponent<NavMeshAgent>();
		this.setFollowWaypoints();
	}
开发者ID:SamDavies,项目名称:GameDesignStudio,代码行数:17,代码来源:AIYakSimple.cs

示例7: Awake

    #endregion

    public bool intro;
    void Awake()
    {
        originalPosition = Camera.main.transform.position;
        firstBison = true;
        if (Instance == null)Instance = this;
        else
        {
            if (this != Instance)
                Destroy(this.gameObject);
        }

        StartCoroutine(SpawnAnimal());

        music = RuntimeManager.CreateInstance ("event:/Music");
        music.start();
        music.setParameterValue("Tension", 0);

        countdown = RuntimeManager.CreateInstance("event:/Sounds/Level_Select_Countdown");
        
开发者ID:TimHaerkens,项目名称:GGJ16,代码行数:21,代码来源:GameManager.cs

示例8: InitStormSndEvt

	void InitStormSndEvt() {
		stormSoundEvt = FMODUnity.RuntimeManager.CreateInstance("event:/ocean");
		stormSoundEvt.setParameterValue("StormLevel", weatherFade);
		stormSoundEvt.start();
	}
开发者ID:clownbox,项目名称:harpoon-lagoon,代码行数:5,代码来源:WeatherController.cs


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