forked from cgvr/DeltaVR
made radio button collision less flaky
This commit is contained in:
Binary file not shown.
@@ -55,15 +55,21 @@ public class ReleasableButton : MonoBehaviour
|
||||
|
||||
private void Activate()
|
||||
{
|
||||
movableParts.DOLocalMoveY(downPositionY, moveDuration);
|
||||
movableParts.DOLocalMoveY(downPositionY, moveDuration).OnComplete(() =>
|
||||
{
|
||||
isButtonDown = true;
|
||||
});
|
||||
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
}
|
||||
|
||||
private void Deactivate()
|
||||
{
|
||||
movableParts.DOLocalMoveY(upPositionY, moveDuration);
|
||||
movableParts.DOLocalMoveY(upPositionY, moveDuration).OnComplete(() =>
|
||||
{
|
||||
isButtonDown = false;
|
||||
});
|
||||
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ButtonTrigger : MonoBehaviour
|
||||
{
|
||||
public bool isEnter;
|
||||
public ReleasableButton button;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26d1ade0a3771324eb46882393dce30a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user