forked from cgvr/DeltaVR
improve fmod whisper bridge and radio button using it
This commit is contained in:
@@ -5,6 +5,8 @@ public class ReleasableButton : MonoBehaviour
|
||||
{
|
||||
public delegate void OnButtonPressedDelegate();
|
||||
public event OnButtonPressedDelegate OnButtonPressed;
|
||||
public delegate void OnButtonReleasedDelegate();
|
||||
public event OnButtonReleasedDelegate OnButtonReleased;
|
||||
|
||||
public Transform movableParts;
|
||||
public float moveDuration = 0.25f;
|
||||
@@ -37,7 +39,6 @@ public class ReleasableButton : MonoBehaviour
|
||||
{
|
||||
if (!isButtonDown && collider.gameObject.tag.EndsWith("Hand"))
|
||||
{
|
||||
Debug.Log("collided with: " + collider.gameObject.name);
|
||||
Activate();
|
||||
OnButtonPressed?.Invoke();
|
||||
}
|
||||
@@ -47,8 +48,8 @@ public class ReleasableButton : MonoBehaviour
|
||||
{
|
||||
if (isButtonDown && collider.gameObject.tag.EndsWith("Hand"))
|
||||
{
|
||||
Debug.Log("collider exited: " + collider.gameObject.name);
|
||||
Deactivate();
|
||||
OnButtonReleased?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user