2025-11-25 08:19:33 -05:00
|
|
|
using System;
|
|
|
|
|
using MoreMountains.Feedbacks;
|
2026-02-13 09:22:11 -05:00
|
|
|
using Sirenix.OdinInspector;
|
2025-11-25 08:19:33 -05:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
2026-02-13 09:22:11 -05:00
|
|
|
namespace SLSUtilities.FeelAssistance
|
2025-11-25 08:19:33 -05:00
|
|
|
{
|
2026-02-13 09:22:11 -05:00
|
|
|
[HideReferenceObjectPicker]
|
2025-11-25 08:19:33 -05:00
|
|
|
public class FeedbackUnit
|
|
|
|
|
{
|
|
|
|
|
public MMF_Player feedback;
|
|
|
|
|
[HideInInspector]
|
|
|
|
|
public Action action;
|
|
|
|
|
[HideInInspector]
|
|
|
|
|
public bool canPlay;
|
|
|
|
|
|
|
|
|
|
public void Play() => canPlay = true;
|
|
|
|
|
|
|
|
|
|
public void Update()
|
|
|
|
|
{
|
|
|
|
|
if (canPlay)
|
|
|
|
|
{
|
|
|
|
|
feedback?.PlayFeedbacks();
|
|
|
|
|
action?.Invoke();
|
|
|
|
|
canPlay = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|