本文整理汇总了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);
}
}
}
示例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;
}
}
示例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!!!");
//-----------------------------
}
示例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();
}
示例5: Start
void Start()
{
StartCoroutine("GO");
tiroInstance = FMODUnity.RuntimeManager.CreateInstance(tiro);
tiroInstance.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
tiroInstance.start();
}
示例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();
}
}
示例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;
}
}
示例8: Start
void Start()
{
vol = FMODUnity.RuntimeManager.CreateInstance(musica1);
vol.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
vol.start();
}
示例9: Start
void Start()
{
StartCoroutine("GO");
volInicio = FMODUnity.RuntimeManager.CreateInstance(parede);
volInicio.setVolume(PlayerPrefs.GetFloat("VolumeFX"));
volInicio.start();
}
示例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();
}
示例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" );
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}