forked from cgvr/DeltaVR
replaced computer printer model, enter key correct sound effect
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
using DG.Tweening;
|
||||
using FMODUnity;
|
||||
using UnityEngine;
|
||||
|
||||
public class PushableButton : MonoBehaviour
|
||||
@@ -12,6 +13,7 @@ public class PushableButton : MonoBehaviour
|
||||
public Transform movableParts;
|
||||
public float moveDuration = 0.25f;
|
||||
public float moveAmount = 0.05f;
|
||||
public EventReference soundEffect = FMODEvents.Instance.Click;
|
||||
|
||||
public MeshRenderer[] wires;
|
||||
public Material wireActiveMaterial;
|
||||
@@ -58,7 +60,7 @@ public class PushableButton : MonoBehaviour
|
||||
{
|
||||
movableParts.DOLocalMoveY(downPositionY, moveDuration);
|
||||
isButtonDown = true;
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
AudioManager.Instance.PlayAttachedInstance(soundEffect, gameObject);
|
||||
|
||||
if (wires != null)
|
||||
{
|
||||
@@ -73,7 +75,7 @@ public class PushableButton : MonoBehaviour
|
||||
{
|
||||
movableParts.DOLocalMoveY(upPositionY, moveDuration);
|
||||
isButtonDown = false;
|
||||
AudioManager.Instance.PlayAttachedInstance(FMODEvents.Instance.Click, gameObject);
|
||||
AudioManager.Instance.PlayAttachedInstance(soundEffect, gameObject);
|
||||
|
||||
if (wires != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user