/// <summary>Stops executing the function setup by the corresponding AddListener</summary> /// <param name="functionToStopCalling">The local function that you've setup to receive update events</param> /// <param name="inputSource">The device you would like to get data from. Any if the action is not device specific.</param> public void RemoveOnStateDownListener(StateDownHandler functionToStopCalling, SteamVR_Input_Sources inputSource) { sourceMap[inputSource].onStateDown -= functionToStopCalling; }
/// <summary>Executes a function when the state of this action (with the specified inputSource) changes to true (from false).</summary> /// <param name="functionToCall">A local function that receives the boolean action who's state has changed, the corresponding input source, and the new value</param> /// <param name="inputSource">The device you would like to get data from. Any if the action is not device specific.</param> public void AddOnStateDownListener(StateDownHandler functionToCall, SteamVR_Input_Sources inputSource) { sourceMap[inputSource].onStateDown += functionToCall; }