미니 게임 및 결과 화면 등
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 47 KiB |
|
|
@ -5,6 +5,7 @@ using UnityEngine;
|
|||
public class HorseRushManager : MonoBehaviour
|
||||
{
|
||||
[SerializeField] HorseRushPanel _horseRushPanel;
|
||||
public MiniGameResult m_MiniGameResult;
|
||||
|
||||
int _horseRushEntryCount;
|
||||
public int HorseRushEntryCount => _horseRushEntryCount;
|
||||
|
|
@ -101,7 +102,7 @@ public class HorseRushManager : MonoBehaviour
|
|||
_horseRushPanel.GameStart(isFreeSweep);
|
||||
}
|
||||
|
||||
public void GameOver(bool isFreeSweep, long score, int normalDoubleScoreCount, int maxFeverStreak, int missionSuccessPhotoID)
|
||||
public void GameOver(bool isFreeSweep, long score, int normalDoubleScoreCount, int maxCombo, int maxFeverStreak, int missionSuccessPhotoID)
|
||||
{
|
||||
if (isFreeSweep)
|
||||
{
|
||||
|
|
@ -118,10 +119,10 @@ public class HorseRushManager : MonoBehaviour
|
|||
}
|
||||
|
||||
// _horseRushPanel.gameObject.SetActive(false);
|
||||
GetReward(score, normalDoubleScoreCount, maxFeverStreak, missionSuccessPhotoID);
|
||||
GetReward(score, normalDoubleScoreCount, maxCombo, maxFeverStreak, missionSuccessPhotoID);
|
||||
}
|
||||
|
||||
public void GetReward(long coinAmount, int rubyAmount, int maxFeverStreak, int missionSuccessPhotoID)
|
||||
public void GetReward(long coinAmount, int rubyAmount, int maxCombo, int maxFeverStreak, int missionSuccessPhotoID)
|
||||
{
|
||||
// 갑자기 하트 관련 보상 기획이 변경되어서 임시 주석 언제 다시 추가할지 모르겠음
|
||||
// int heartAmount = GetHeartAmount(maxFeverStreak);
|
||||
|
|
@ -129,41 +130,54 @@ public class HorseRushManager : MonoBehaviour
|
|||
_playCount++;
|
||||
_maxFever = maxFeverStreak > _maxFever ? maxFeverStreak : _maxFever;
|
||||
_maxScore = coinAmount > _maxScore ? coinAmount : _maxScore;
|
||||
var addcoinrate = maxCombo / 1000f;
|
||||
var bonuscoin = 0;
|
||||
if (addcoinrate > 0f)
|
||||
{
|
||||
bonuscoin = (int)(coinAmount * addcoinrate);
|
||||
coinAmount += bonuscoin;
|
||||
}
|
||||
|
||||
//bool isPackage = GameManager.Instance.IsPackageBPurchased();
|
||||
|
||||
//CurrencyManager.Instance.AddGoods(101, coinAmount * (isPackage ? 2 : 1));
|
||||
//CurrencyManager.Instance.AddGoods(102, rubyAmount);
|
||||
//// CurrencyManager.Instance.AddGoods(103, heartAmount);
|
||||
// CurrencyManager.Instance.AddGoods(103, heartAmount);
|
||||
|
||||
//if (maxFeverStreak >= _missionFeverCount && missionSuccessPhotoID != -1)
|
||||
//{
|
||||
// DataManager.Instance.PhotoBoost.IncreaseQuantity(missionSuccessPhotoID, 1);
|
||||
SaveMgr.Ins.Add_Money(eMoney.Gacha, (int)coinAmount);
|
||||
SaveMgr.Ins.Add_Money(eMoney.Chat, rubyAmount);
|
||||
SaveMgr.Ins.Save();
|
||||
m_MiniGameResult.Set(coinAmount, bonuscoin, rubyAmount, maxCombo, maxFeverStreak, missionSuccessPhotoID,
|
||||
() => { _horseRushPanel.gameObject.SetActive(false); });
|
||||
|
||||
// int albumID = DataManager.Instance.GetPhotoData(missionSuccessPhotoID).AlbumID;
|
||||
// bool isFullCollection = true;
|
||||
// int fullCollectionPhotoId = -1;
|
||||
// var photos = DataManager.Instance.GetPhotoDatasByAlbumID(albumID);
|
||||
// foreach (var photo in photos.Values)
|
||||
// {
|
||||
// if (photo.CollectionMethod == CollectionMethod.FullCollection)
|
||||
// {
|
||||
// fullCollectionPhotoId = photo.ID;
|
||||
// continue;
|
||||
// }
|
||||
if (maxFeverStreak >= _missionFeverCount && missionSuccessPhotoID != -1)
|
||||
{
|
||||
//DataManager.Instance.PhotoBoost.IncreaseQuantity(missionSuccessPhotoID, 1);
|
||||
|
||||
// if (DataManager.Instance.PhotoBoost.GetQuantity(photo.ID) == 0)
|
||||
// {
|
||||
// isFullCollection = false;
|
||||
// }
|
||||
// }
|
||||
//int albumID = DataManager.Instance.GetPhotoData(missionSuccessPhotoID).AlbumID;
|
||||
//bool isFullCollection = true;
|
||||
//int fullCollectionPhotoId = -1;
|
||||
//var photos = DataManager.Instance.GetPhotoDatasByAlbumID(albumID);
|
||||
//foreach (var photo in photos.Values)
|
||||
//{
|
||||
// if (photo.CollectionMethod == CollectionMethod.FullCollection)
|
||||
// {
|
||||
// fullCollectionPhotoId = photo.ID;
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// if (isFullCollection && DataManager.Instance.PhotoBoost.GetLevel(fullCollectionPhotoId) == 0)
|
||||
// {
|
||||
// DataManager.Instance.PhotoBoost.IncreaseQuantity(fullCollectionPhotoId, 1);
|
||||
// UIEvents.ShowToast(Local.GetLocalizedUIString("COLLECTION_REWARD_RECEIVED"));
|
||||
// }
|
||||
//}
|
||||
// if (DataManager.Instance.PhotoBoost.GetQuantity(photo.ID) == 0)
|
||||
// {
|
||||
// isFullCollection = false;
|
||||
// }
|
||||
//}
|
||||
|
||||
//if (isFullCollection && DataManager.Instance.PhotoBoost.GetLevel(fullCollectionPhotoId) == 0)
|
||||
//{
|
||||
// DataManager.Instance.PhotoBoost.IncreaseQuantity(fullCollectionPhotoId, 1);
|
||||
// UIEvents.ShowToast(Local.GetLocalizedUIString("COLLECTION_REWARD_RECEIVED"));
|
||||
//}
|
||||
}
|
||||
|
||||
//GameManager.Instance.Save();
|
||||
//UIEvents.OnOpenMiniGameResultModal(coinAmount, rubyAmount, maxFeverStreak, missionSuccessPhotoID);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using GUPS.AntiCheat.Protected;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
|
@ -14,6 +16,7 @@ public class HorseRushPanel : MonoBehaviour
|
|||
[SerializeField] Button _rightButton;
|
||||
[SerializeField] GameObject _leftEffect;
|
||||
[SerializeField] GameObject _rightEffect;
|
||||
public TextMeshProUGUI[] texts_money; // 0 채팅 코인, 1 골드
|
||||
|
||||
#region TEST
|
||||
|
||||
|
|
@ -70,6 +73,7 @@ public class HorseRushPanel : MonoBehaviour
|
|||
int _totalComboCount = 0;
|
||||
int _comboCount = 0;
|
||||
int _levelComboCount = 0;
|
||||
ProtectedInt32 _maxcombo;
|
||||
|
||||
int _feverLevel = 0;
|
||||
long _score = 0;
|
||||
|
|
@ -87,6 +91,7 @@ public class HorseRushPanel : MonoBehaviour
|
|||
private int _normalDoubleScoreCount = 0; // 일반 상태에서의 더블 스코어 성공 횟수
|
||||
public int NormalDoubleScoreCount => _normalDoubleScoreCount;
|
||||
|
||||
ProtectedInt32 m_GachaCoint, m_ChatCoint;
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
@ -181,9 +186,9 @@ public class HorseRushPanel : MonoBehaviour
|
|||
{
|
||||
_isGameStart = false;
|
||||
_isGameOver = true;
|
||||
_horseRushManager.GameOver(_isFree, _score, _normalDoubleScoreCount, _maxFeverStreak, _missionSuccessPhotoID);
|
||||
_horseRushManager.GameOver(_isFree, _score, _normalDoubleScoreCount, _maxcombo, _maxFeverStreak, _missionSuccessPhotoID);
|
||||
|
||||
gameObject.SetActive(false);
|
||||
//gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
_timer.value = _limitTime / DEFAULT_LIMIT_TIME;
|
||||
|
|
@ -316,10 +321,13 @@ public class HorseRushPanel : MonoBehaviour
|
|||
_stunTime = 0;
|
||||
_feverTime = 0;
|
||||
_totalComboCount = 0;
|
||||
_maxcombo = 0; _maxcombo.Obfuscate();
|
||||
_comboCount = 0;
|
||||
_levelComboCount = 0;
|
||||
_feverLevel = 0;
|
||||
_score = 0;
|
||||
m_GachaCoint = 0; m_GachaCoint.Obfuscate();
|
||||
m_ChatCoint = 0; m_ChatCoint.Obfuscate();
|
||||
|
||||
// UI 초기화
|
||||
_combo.SetActive(false);
|
||||
|
|
@ -329,6 +337,8 @@ public class HorseRushPanel : MonoBehaviour
|
|||
_loveEffectImage.fillAmount = 1;
|
||||
_timer.value = 1;
|
||||
_bottomSlider.value = 1;
|
||||
texts_money[0].text = SaveMgr.Ins.Get_Money(eMoney.Chat).ToString();
|
||||
texts_money[1].text = SaveMgr.Ins.Get_Money(eMoney.Gacha).ToString();
|
||||
|
||||
// 시간 텍스트 초기화
|
||||
TimeSpan timeSpan = TimeSpan.FromSeconds(_limitTime);
|
||||
|
|
@ -399,6 +409,12 @@ public class HorseRushPanel : MonoBehaviour
|
|||
lastBubbleCard.transform.SetAsFirstSibling();
|
||||
|
||||
_rushTime = Mathf.Min(RUSH_LIMIT_TIME, _rushTime + _addRushTimeValue);
|
||||
|
||||
if (!IsFever)
|
||||
{
|
||||
m_ChatCoint += lastBubbleCard.IsGoldCarrot ? 1 : 0;
|
||||
m_ChatCoint.Obfuscate();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -413,7 +429,7 @@ public class HorseRushPanel : MonoBehaviour
|
|||
{
|
||||
_isGameStart = false;
|
||||
_isGameOver = true;
|
||||
_horseRushManager.GameOver(_isFree, _score, _normalDoubleScoreCount, _maxFeverStreak, _missionSuccessPhotoID);
|
||||
_horseRushManager.GameOver(_isFree, _score, _normalDoubleScoreCount, _maxcombo, _maxFeverStreak, _missionSuccessPhotoID);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -496,6 +512,11 @@ public class HorseRushPanel : MonoBehaviour
|
|||
{
|
||||
_totalComboCount++;
|
||||
_comboCount++;
|
||||
if (_maxcombo < _comboCount)
|
||||
{
|
||||
_maxcombo = _comboCount;
|
||||
_maxcombo.Obfuscate();
|
||||
}
|
||||
|
||||
BubbleCard lastBubbleCard = _bubbleCardList[^1];
|
||||
if (!lastBubbleCard.IsFever && isDoubleScore)
|
||||
|
|
@ -617,4 +638,9 @@ public class HorseRushPanel : MonoBehaviour
|
|||
sequence.Append(_comboText.transform.DOScale(targetScale, bounceDuration / 2).SetEase(Ease.OutQuad))
|
||||
.Append(_comboText.transform.DOScale(originalScale, bounceDuration / 2).SetEase(Ease.InQuad));
|
||||
}
|
||||
|
||||
public void OnClick_GameLeave()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66193,18 +66193,6 @@ PrefabInstance:
|
|||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1282495625036036538, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1282495625036036538, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1408241348796832709, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -59.99997
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2200321813798097808, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0
|
||||
|
|
@ -66289,26 +66277,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: HorseRushCanvas
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3816820624324620561, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5974020988588017499, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_Camera
|
||||
value:
|
||||
objectReference: {fileID: 519420031}
|
||||
- target: {fileID: 6102112568647830540, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7393116813224399299, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7393116813224399299, guid: b2467f2b599a7fb4f842dc956284d743, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
|
|
|||
|
|
@ -57,14 +57,19 @@ public class MiniGameAlbumSelect : uScrollViewMgr
|
|||
{
|
||||
if (m_SelectCard)
|
||||
{
|
||||
bool gogame = false;
|
||||
if (SaveMgr.Ins.IsInfinityMiniGame())
|
||||
{
|
||||
gogame = true;
|
||||
}
|
||||
else if (SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, true))
|
||||
{
|
||||
SaveMgr.Ins.Add_Money(eMoney.MiniGameHP, -1);
|
||||
SaveMgr.Ins.Save();
|
||||
gogame = true;
|
||||
}
|
||||
|
||||
if (gogame) LobbyUI.Ins.m_MiniGame.GameStart(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using GUPS.AntiCheat.Protected;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class MiniGameResult : MonoBehaviour
|
||||
{
|
||||
public TextMeshProUGUI[] texts; // 0 최대 콤보, 1 콤보 보너스, 2 획득 채팅 코인, 3 획득 가챠 코인, 4 추가 획득량
|
||||
|
||||
ProtectedInt32 m_coinAmount, m_rubyAmount;
|
||||
Action act_off;
|
||||
|
||||
public void Set(long coinAmount, int bonuscoin, int rubyAmount, int maxCombo, int maxFeverStreak,
|
||||
int missionSuccessPhotoID, Action _off)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
act_off = _off;
|
||||
|
||||
m_coinAmount = (int)coinAmount;
|
||||
m_coinAmount.Obfuscate();
|
||||
m_rubyAmount = rubyAmount;
|
||||
m_rubyAmount.Obfuscate();
|
||||
|
||||
texts[0].text = maxCombo.ToString();
|
||||
texts[1].text = ((int)(maxCombo / 10f)).ToString() + "%";
|
||||
texts[2].text = rubyAmount.ToString();
|
||||
texts[3].text = coinAmount.ToString();
|
||||
texts[4].text = $"+{bonuscoin}";
|
||||
}
|
||||
|
||||
public void OnClick_AD()
|
||||
{
|
||||
ADInfo.Ins.Show_AD(false, () =>
|
||||
{
|
||||
SaveMgr.Ins.Add_Money(eMoney.Gacha, m_coinAmount);
|
||||
SaveMgr.Ins.Add_Money(eMoney.Chat, m_rubyAmount);
|
||||
SaveMgr.Ins.Save();
|
||||
|
||||
gameObject.SetActive(false);
|
||||
act_off();
|
||||
});
|
||||
}
|
||||
public void OnClick_Close()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
act_off();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4349858a82180e646b2c70b5cc690276
|
||||