From a22c505984697881f5f911a165ee022087b69e09 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Mon, 20 May 2024 22:36:58 +0800 Subject: *rename --- Thronefall_1_0/Decompile/Coinslot.cs | 76 ------------------------------------ 1 file changed, 76 deletions(-) delete mode 100644 Thronefall_1_0/Decompile/Coinslot.cs (limited to 'Thronefall_1_0/Decompile/Coinslot.cs') diff --git a/Thronefall_1_0/Decompile/Coinslot.cs b/Thronefall_1_0/Decompile/Coinslot.cs deleted file mode 100644 index 4a505f1..0000000 --- a/Thronefall_1_0/Decompile/Coinslot.cs +++ /dev/null @@ -1,76 +0,0 @@ -using MoreMountains.Feedbacks; -using UnityEngine; - -public class Coinslot : MonoBehaviour -{ - public Transform fillTarget; - - public AnimationCurve fillCurve; - - public MMF_Player fullFeedback; - - public MMF_Player deniedFeedback; - - public MMF_Player appearFeedback; - - public MMF_Player disappearFeedback; - - public MMF_Player fullCompleteFeedback; - - private float fill01; - - public bool isFull => fill01 >= 1f; - - public float CurrentFill01 => fill01; - - public bool AddFill(float percentage, bool isLastCoin) - { - fill01 += percentage; - fillTarget.localScale = Vector3.one * fillCurve.Evaluate(Mathf.Clamp01(fill01)); - if (isFull) - { - if (!isLastCoin) - { - fullFeedback.PlayFeedbacks(); - } - else - { - fullCompleteFeedback.PlayFeedbacks(); - } - return true; - } - return false; - } - - public void SetEmpty() - { - fill01 = 0f; - fillTarget.localScale = Vector3.zero; - } - - public void PlayDeny() - { - deniedFeedback.PlayFeedbacks(); - } - - public void Appear() - { - fullFeedback.StopFeedbacks(); - deniedFeedback.StopFeedbacks(); - appearFeedback.StopFeedbacks(); - disappearFeedback.StopFeedbacks(); - fill01 = 0f; - fillTarget.localScale = Vector3.zero; - base.transform.localScale = Vector3.zero; - appearFeedback.PlayFeedbacks(); - } - - public void Disappear() - { - fullFeedback.StopFeedbacks(); - deniedFeedback.StopFeedbacks(); - appearFeedback.StopFeedbacks(); - disappearFeedback.StopFeedbacks(); - disappearFeedback.PlayFeedbacks(); - } -} -- cgit v1.1-26-g67d0