void Start() { m_ControllerBody = m_Controller.GetComponent<Rigidbody>(); m_FootstepState = FMODUnity.RuntimeManager.CreateInstance(m_FootstepEvent); m_FootstepState.start(); m_FootstepState.getParameterByIndex(0, out m_FootstepsWalking); m_FootstepState.getParameterByIndex(1, out m_FootstepsRunning); }
// Update is called once per frame void Update() { IntensityChanger(); //Debug stuff #region if (Input.GetKey(KeyCode.Alpha1)) { bgm.setParameterValueByIndex(0, 0.5f); } if (Input.GetKey(KeyCode.Alpha2)) { bgm.setParameterValueByIndex(0, 1.5f); } if (Input.GetKey(KeyCode.Alpha3)) { bgm.setParameterValueByIndex(0, 2.5f); } if (Input.GetKey(KeyCode.Alpha4)) { bgm.setParameterValueByIndex(0, 3.5f); } if (Input.GetKey(KeyCode.BackQuote)) { FMOD.Studio.ParameterInstance testparam; float testValue; bgm.getParameterByIndex(0, out testparam); testparam.getValue(out testValue); Debug.Log(testValue); } #endregion }
public ParameterInstance this[int index] { get { FMOD.Studio.ParameterInstance instance; _eventInstance.getParameterByIndex(index, out instance).Check(); return(ParameterInstance.FromFmod(instance)); } }
public static void SetEventParameterValue(int index, float val) { if (currentInstance != null && currentInstance.isValid()) { FMOD.Studio.ParameterInstance param; currentInstance.getParameterByIndex(index, out param); param.setValue(val); } }