diff --git a/Assets/Resources/Prefabs/HorseRush/Script/BubbleCard.cs b/Assets/Resources/Prefabs/HorseRush/Script/BubbleCard.cs index f6eaece..f4dba2b 100644 --- a/Assets/Resources/Prefabs/HorseRush/Script/BubbleCard.cs +++ b/Assets/Resources/Prefabs/HorseRush/Script/BubbleCard.cs @@ -1,5 +1,3 @@ -using System.Collections; -using System.Collections.Generic; using DG.Tweening; using UnityEngine; using UnityEngine.UI; @@ -10,19 +8,10 @@ public class BubbleCard : MonoBehaviour [SerializeField] GameObject _rightItem; public bool IsLeftCarrot { get; private set; } - public bool IsGoldCarrot { get; private set; } + public bool IsHeartCarrot { get; private set; } public bool IsSkullStone { get; private set; } public bool IsFever { get; private set; } - float APPEAR_GOLD_CARROT_RATE; - float APPEAR_SKULL_RATE; - - void Awake() - { - APPEAR_GOLD_CARROT_RATE = 100f; - APPEAR_SKULL_RATE = 200f; - } - public void SetScale(int index, float moveTime) { Vector3 scale = index == 10 ? new Vector3(1.2f, 1.2f, 1.2f) : index == 11 ? new Vector3(1.5f, 1.5f, 1.5f) : index == 0 ? new Vector3(0.5f, 0.5f, 0.5f) : Vector3.one; @@ -44,20 +33,19 @@ public class BubbleCard : MonoBehaviour if (isFever) { - IsGoldCarrot = true; + IsHeartCarrot = true; carrotObject.GetComponent().sprite = Resources.Load(defaultPath + "Bubble_Fever"); stoneObject.GetComponent().sprite = Resources.Load(defaultPath + "Bubble_Fever"); } else { // HorseRushManager.Instance.APPEAR_GOLD_CARROT_RATE - bool isGoldCarrot = Random.Range(0, 10000) <= APPEAR_GOLD_CARROT_RATE; - IsGoldCarrot = isGoldCarrot; - bool isSkullStone = Random.Range(0, 10000) <= APPEAR_SKULL_RATE; - IsSkullStone = isSkullStone; + IsHeartCarrot = DSUtil.RandomTrue(table_GlobalValue.Ins.Get_Float("GoodType_HeartConRate")); + if (!IsHeartCarrot) + IsSkullStone = DSUtil.RandomTrue(table_GlobalValue.Ins.Get_Float("BadType_Bomb")); - carrotObject.GetComponent().sprite = Resources.Load(defaultPath + (isGoldCarrot ? "Bubble_GoldedCarrot" : "Bubble_Carrot")); - stoneObject.GetComponent().sprite = Resources.Load(defaultPath + (isSkullStone ? "Bubble_Stun" : "Bubble_Stone")); + carrotObject.GetComponent().sprite = Resources.Load(defaultPath + (IsHeartCarrot ? "Bubble_GoldedCarrot" : "Bubble_Carrot")); + stoneObject.GetComponent().sprite = Resources.Load(defaultPath + (IsSkullStone ? "Bubble_Stun" : "Bubble_Stone")); } } diff --git a/Assets/Resources/Prefabs/HorseRush/Script/HorseRushPanel.cs b/Assets/Resources/Prefabs/HorseRush/Script/HorseRushPanel.cs index 98e15e1..1bba437 100644 --- a/Assets/Resources/Prefabs/HorseRush/Script/HorseRushPanel.cs +++ b/Assets/Resources/Prefabs/HorseRush/Script/HorseRushPanel.cs @@ -400,7 +400,7 @@ public class HorseRushPanel : MonoBehaviour if (isCorrect) { - AddComboCount(lastBubbleCard.IsGoldCarrot); + AddComboCount(lastBubbleCard.IsHeartCarrot); MoveBubbleCard(); lastBubbleCard.transform.SetAsFirstSibling(); @@ -408,7 +408,7 @@ public class HorseRushPanel : MonoBehaviour if (!IsFever) { - m_ChatCoint += lastBubbleCard.IsGoldCarrot ? 1 : 0; + m_ChatCoint += lastBubbleCard.IsHeartCarrot ? 1 : 0; m_ChatCoint.Obfuscate(); } }