基础内容
必要插件安装 缓动曲线和动画基础 ElementFolder,Track与其次级模块,PathNode重构
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user