Files
ichni_Creator_Studio/Assets/Feel/FeelDemos/CardsUI/Scripts/FeelCardsUIStackButton.cs
SoulliesOfficial 8d0abec75f 基础内容
必要插件安装
缓动曲线和动画基础
ElementFolder,Track与其次级模块,PathNode重构
2025-01-26 21:10:16 -05:00

36 lines
827 B
C#

using System.Collections;
using System.Collections.Generic;
using MoreMountains.Feedbacks;
using UnityEngine;
namespace MoreMountains.Feel
{
[AddComponentMenu("")]
public class FeelCardsUIStackButton : MonoBehaviour
{
/// the MMFeedback to play when pressing the stack button
public MMFeedbacks StackFeedback;
/// a list of feedbacks that should prevent the button from working if any of them is still playing
public List<MMFeedbacks> BlockerFeedbacks;
public virtual void Stack()
{
bool blocked = false;
foreach (MMFeedbacks feedbacks in BlockerFeedbacks)
{
if (feedbacks.IsPlaying)
{
blocked = true;
}
}
if (blocked)
{
return;
}
StackFeedback?.PlayFeedbacks();
this.gameObject.SetActive(false);
}
}
}