LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/AlarmButton.cs

26 lines
405 B
C#
Raw Normal View History

2023-12-22 22:51:17 +00:00
using UnityEngine;
public class AlarmButton : MonoBehaviour
{
private Animator buttonAnimator;
public float timeSincePushing;
public void PushAlarmButton()
{
if (!(timeSincePushing < 1f))
{
buttonAnimator.SetTrigger("press");
HUDManager.Instance.TriggerAlarmHornEffect();
}
}
private void Update()
{
if (timeSincePushing <= 5f)
{
timeSincePushing += Time.deltaTime;
}
}
}