※ 각 재화의 등장 확률은 GlobalValue에 다음과 같이 확률을 셋팅해 사용한다.

GoodType_GoldConRate :  97%

GoodType_HeartConRate : 2.8%

GoodType_ChatConRate : 0.2%

——————————————

BadType_Timer : 97%

BadType_Bomb : 3%
This commit is contained in:
Ino 2025-12-16 15:55:40 +09:00
parent 1c4cd936b9
commit be43b86000
2 changed files with 9 additions and 21 deletions

View File

@ -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<Image>().sprite = Resources.Load<Sprite>(defaultPath + "Bubble_Fever");
stoneObject.GetComponent<Image>().sprite = Resources.Load<Sprite>(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<Image>().sprite = Resources.Load<Sprite>(defaultPath + (isGoldCarrot ? "Bubble_GoldedCarrot" : "Bubble_Carrot"));
stoneObject.GetComponent<Image>().sprite = Resources.Load<Sprite>(defaultPath + (isSkullStone ? "Bubble_Stun" : "Bubble_Stone"));
carrotObject.GetComponent<Image>().sprite = Resources.Load<Sprite>(defaultPath + (IsHeartCarrot ? "Bubble_GoldedCarrot" : "Bubble_Carrot"));
stoneObject.GetComponent<Image>().sprite = Resources.Load<Sprite>(defaultPath + (IsSkullStone ? "Bubble_Stun" : "Bubble_Stone"));
}
}

View File

@ -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();
}
}