게임 결과...

This commit is contained in:
Ino 2025-08-31 06:09:29 +09:00
parent 18ef2d16e9
commit 5bd81704db
12 changed files with 172 additions and 66 deletions

View File

@ -221,7 +221,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\uC9C4\uD589"
m_text: "\uC2B9\uB9AC"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: cf1ae75e65a967946b23286a5ffbb812, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 1cd9f54883d04fa4a8273aaf06ef64e9, type: 2}
@ -432,7 +432,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: "\uC2B9\uB9AC"
m_text: "\uC9C4\uD589"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: cf1ae75e65a967946b23286a5ffbb812, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 1cd9f54883d04fa4a8273aaf06ef64e9, type: 2}

View File

@ -866,7 +866,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 3284139348423762701}
m_TargetAssemblyTypeName: ResultPopup, Assembly-CSharp
m_MethodName:
m_MethodName: ClickShop
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
@ -1431,7 +1431,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 3284139348423762701}
m_TargetAssemblyTypeName: ResultPopup, Assembly-CSharp
m_MethodName:
m_MethodName: ClickMilgi
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
@ -1561,8 +1561,6 @@ MonoBehaviour:
NormalGameObjects:
- {fileID: 3770223039897269369}
- {fileID: 2975167125846470109}
ClearChallengeObjects:
- {fileID: 0}
--- !u!114 &6042027882932108988
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@ -14053,6 +14053,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 301590531}
- component: {fileID: 301590533}
- component: {fileID: 301590530}
- component: {fileID: 301590529}
- component: {fileID: 301590528}
@ -14167,6 +14168,26 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6b4a5b43f2cdfa1458b26cf8e05f29d2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &301590533
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 301590527}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 367858325375b774eb678790bc4991a3, type: 3}
m_Name:
m_EditorClassIdentifier:
go_GamePanel: {fileID: 771770699}
go_AlbumPanel: {fileID: 1535761048}
go_MainPanel: {fileID: 1166114707}
go_ShopPanel: {fileID: 833499340}
go_TopPanel: {fileID: 302272076}
go_BottomPanel: {fileID: 559934551}
go_Bottom_LB: {fileID: 2137650019}
go_Bottom_RB: {fileID: 1058167915}
--- !u!1 &302272076
GameObject:
m_ObjectHideFlags: 0
@ -74075,7 +74096,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 61, y: 33.83}
m_AnchoredPosition: {x: 94, y: 33.83}
m_SizeDelta: {x: 291.45, y: 59.93}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1285024410
@ -89974,9 +89995,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 1722250695}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -95, y: -0.000015258789}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 45.6, y: -0.000015258789}
m_SizeDelta: {x: 57, y: 57}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1369731817
@ -119145,7 +119166,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 12.5, y: 0}
m_AnchoredPosition: {x: 21.3, y: 0}
m_SizeDelta: {x: -125, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1692184578
@ -119168,9 +119189,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: '99
'
m_text: "000\uB9CC 0000\uB0E5"
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: cf1ae75e65a967946b23286a5ffbb812, type: 2}
m_sharedMaterial: {fileID: 2100000, guid: 1cd9f54883d04fa4a8273aaf06ef64e9, type: 2}
@ -119200,20 +119219,20 @@ MonoBehaviour:
m_fontSize: 40
m_fontSizeBase: 40
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_enableAutoSizing: 1
m_fontSizeMin: 40
m_fontSizeMax: 40
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterSpacing: -5
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 0
m_charWidthMaxAdj: 50
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
@ -119235,7 +119254,7 @@ MonoBehaviour:
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 0
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_margin: {x: -1.9631882, y: 0, z: -9.8159485, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
@ -119405,7 +119424,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -234, y: 33.83}
m_SizeDelta: {x: 291.45, y: 59.93}
m_SizeDelta: {x: 345.6, y: 59.9}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1722250696
MonoBehaviour:

View File

@ -143,7 +143,7 @@ public class ADSManager : MonoBehaviour
#endregion
#region Interstitial
public void ShowInterstitialAd()
public void ShowInterstitialAd(Action success = null)
{
if (GameManager.DB.IsRemoveADS)
{
@ -159,6 +159,7 @@ public class ADSManager : MonoBehaviour
else
{
adDictionary["Game_Interstitial"].ShowAd();
success?.Invoke();
}
}
}

View File

@ -0,0 +1,31 @@
using UnityEngine;
public class CanvasControl : MonoBehaviour
{
public static CanvasControl Ins;
private void Awake()
{
Ins = this;
}
[SerializeField] private GameObject go_GamePanel, go_AlbumPanel, go_MainPanel, go_ShopPanel, go_TopPanel, go_BottomPanel;
[SerializeField] private GameObject go_Bottom_LB, go_Bottom_RB;
public void Go_Shop()
{
go_GamePanel.SetActive(false);
go_AlbumPanel.SetActive(false);
go_MainPanel.SetActive(false);
go_ShopPanel.SetActive(true);
go_TopPanel.SetActive(true);
go_BottomPanel.SetActive(true);
go_Bottom_LB.SetActive(false);
go_Bottom_RB.SetActive(false);
}
public void Go_Main()
{
}
}

View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 367858325375b774eb678790bc4991a3

View File

@ -35,6 +35,7 @@ public partial class GamePanel : MonoBehaviour
private bool _isSelctedSepYulggetState = false;
public bool UseSepYulgget_To_Pee { get; set; } = false;
public int Player_Bell { get; set; } = 0;
public int Player_Milgi { get; set; } = 0;
public int AI_Bell { get; set; } = 0;
public int Player_Bbug { get; set; } = 0;
public int AI_Bbug { get; set; } = 0;
@ -246,6 +247,7 @@ public partial class GamePanel : MonoBehaviour
{
switch (type)
{
case EScoreMutiplyType.Go:
case EScoreMutiplyType.Gobak:
case EScoreMutiplyType.Peebak:
case EScoreMutiplyType.Gwhangbak:

View File

@ -349,6 +349,8 @@ public partial class GamePanel : MonoBehaviour
else
result *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(pair) * AI_Bell;
}
else if (pair == EScoreMutiplyType.ClickedFromResultPopup)
result *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(pair) * Player_Milgi;
else
result *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(pair);
}

View File

@ -28,6 +28,8 @@ public class GoStopPopup : PopupBase
if (multipleType[i] == EScoreMutiplyType.Shake)
multiply *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]) * GamePanel.Instance.Player_Bell;
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
multiply *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]) * GamePanel.Instance.Player_Milgi;
else
multiply *= CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
}

View File

@ -28,15 +28,19 @@ public class ResultPopup : PopupBase
private bool _isDetail = false;
List<ResultxInfoData> list_xinfo = new List<ResultxInfoData>
{
new ResultxInfoData{ type = EScoreMutiplyType.Go, name = "고" },
new ResultxInfoData{ type = EScoreMutiplyType.Gobak, name = "고박" },
new ResultxInfoData{ type = EScoreMutiplyType.Meongbak, name = "멍박" },
new ResultxInfoData{ type = EScoreMutiplyType.Peebak, name = "피박" },
new ResultxInfoData{ type = EScoreMutiplyType.Gwhangbak, name = "광박" },
new ResultxInfoData{ type = EScoreMutiplyType.Shake, name = "흔듦" },
new ResultxInfoData{ type = EScoreMutiplyType.Nagari, name = "나가리" },
new ResultxInfoData{ type = EScoreMutiplyType.ClickedFromResultPopup, name = "" },
new ResultxInfoData{ type = EScoreMutiplyType.ClickedFromResultPopup, name = "기" },
};
long enemyBeforeGold;
long myBeforeGold;
protected override void Awake()
{
base.Awake();
@ -83,13 +87,14 @@ public class ResultPopup : PopupBase
DSUtil.InActivateGameObjects(gos_bankrupt);
GoldTMP.enabled = true;
ButtonlabelTMP.text = _gameResult ? "밀기 2배\n<size=35>이번 판 무효" : "밀기 4배\n<size=35>이번 판 무효";
list_xinfo.ForEach(f => f.mul = 0); // 초기화
go_milgiad.SetActive(false);
enemyBeforeGold = GameManager.DB.GetRemainigNormalGameAIGold();
myBeforeGold = GameManager.DB.Gold;
if (gameResult)
{ // win
ButtonlabelTMP.text = "밀기 4배\n<size=35>이번 판 무효";
if (fixedScore <= 0)
{
int score = GamePanel.Instance.GetTotalScore(true, false);
@ -109,7 +114,7 @@ public class ResultPopup : PopupBase
}
else if (goNumer >= 3)
{
multiply += goNumer - 1;
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.Go);
}
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(gameResult);
@ -124,6 +129,10 @@ public class ResultPopup : PopupBase
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
if (multipleType[i] == EScoreMutiplyType.Shake)
val *= GamePanel.Instance.Player_Bell;
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
val *= GamePanel.Instance.Player_Milgi;
else if (multipleType[i] == EScoreMutiplyType.Go)
val *= goNumer - 2;
multiply *= val;
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
}
@ -131,23 +140,7 @@ public class ResultPopup : PopupBase
if (multiply > 0)
{
if (goNumer >= 3)
{
if (multiply > goNumer - 1)
{
int withoutGoMultiply = multiply / (goNumer - 1);
t_Cal.text = str + $" x {withoutGoMultiply}배\n= 총 {score * multiply}점\n";
}
else
{
t_Cal.text = str + $" x {goNumer}고(x{goNumer - 1})\n= 총 {score * multiply}점\n";
}
}
else
{
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점\n";
}
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점\n";
_resultTotalGold = score * multiply * GamePanel.Instance.Stake;
}
else
@ -223,12 +216,10 @@ public class ResultPopup : PopupBase
}
else
{ // lose
ButtonlabelTMP.text = "밀기 2배\n<size=35>이번 판 무효";
go_milgiad.SetActive(true);
GameManager.Sound.PlaySFX(ESFXType.Lose);
DSUtil.InActivateGameObjects(gos_result, 1);
/* <size=40><color=yellow><3E><>ȿ</color></size>*/
if (fixedScore <= 0)
{
@ -249,7 +240,7 @@ public class ResultPopup : PopupBase
}
else if (goNumer >= 3)
{
multiply += goNumer - 1;
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.Go);
}
@ -264,7 +255,11 @@ public class ResultPopup : PopupBase
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
if (multipleType[i] == EScoreMutiplyType.Shake)
val *= GamePanel.Instance.AI_Bell;
val *= GamePanel.Instance.Player_Bell;
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
val *= GamePanel.Instance.Player_Milgi;
else if (multipleType[i] == EScoreMutiplyType.Go)
val *= goNumer - 2;
multiply *= val;
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
}
@ -272,20 +267,7 @@ public class ResultPopup : PopupBase
if (multiply > 0)
{
if (goNumer >= 3)
{
if (multiply > goNumer - 1)
{
int withoutGoMultiply = multiply / (goNumer - 1);
t_Cal.text = str + $" x {withoutGoMultiply}배\n= 총 {score * multiply}점";
}
else
{
t_Cal.text = str + $" x {goNumer}고(x{goNumer - 1})\n= 총 {score * multiply}점";
}
}
else
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점";
t_Cal.text = str + $" x {multiply}배\n= 총 {score * multiply}점";
_resultTotalGold = score * multiply * GamePanel.Instance.Stake;
}
else
@ -333,13 +315,41 @@ public class ResultPopup : PopupBase
public void WinWithFirstBbug(long resultGold)
{
_gameResult = true;
ButtonlabelTMP.text = _gameResult ? "밀기 4배\n<size=35>이번 판 무효" : "밀기 2배\n<size=35>이번 판 무효";
GoldTMP.enabled = true;
GameManager.Sound.PlaySFX(ESFXType.Win);
DSUtil.InActivateGameObjects(gos_result, 0);
_resultTotalGold = resultGold;
t_Cal.text = $"7점\n= 총 7점\nx {GamePanel.Instance.Stake}냥";
list_xinfo.ForEach(f => f.mul = 0); // 초기화
var multipleType = GamePanel.Instance.GetAndUpdateScoreMultiplyType(_gameResult);
int multiply = 0;
if (multipleType != null)
{
for (int i = 0; i < multipleType.Count; i++)
{
if (multiply <= 0)
multiply = 1;
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
if (multipleType[i] == EScoreMutiplyType.Shake)
val *= GamePanel.Instance.Player_Bell;
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
val *= GamePanel.Instance.Player_Milgi;
multiply *= val;
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
}
}
go_milgiad.SetActive(false);
var lastPoint = 7 * (multiply > 1 ? multiply : 1);
_resultTotalGold = resultGold * (multiply > 1 ? multiply : 1);
if (multiply > 1)
t_Cal.text = $"7점 x {multiply}배\n= 총 {lastPoint}점\nx {GamePanel.Instance.Stake}냥";
else
t_Cal.text = $"{lastPoint}점\n= 총 {lastPoint}점\nx {GamePanel.Instance.Stake}냥";
GoldTMP.text = "+" + CodeJay.CodeJayUtility.Converter.MoneyToString(_resultTotalGold);
@ -378,11 +388,45 @@ public class ResultPopup : PopupBase
}
}
m_ResultxList.Set(list_xinfo);
DSUtil.InActivateGameObjects(gos_bankrupt, 0);
gos_bankrupt[0].GetComponent<RectTransform>().DOScale(1f, 1f).From(3f).SetEase(Ease.InExpo);
gos_bankrupt[0].GetComponent<Image>().DOFade(1f, 1f).From(0f).SetEase(Ease.InExpo);
t_enemygold.text = "0냥";
t_mygold.text = CodeJay.CodeJayUtility.Converter.MoneyToString(GameManager.DB.Gold);
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeGold);
GameManager.Event.InvokeEvent(EEventType.OnGameEnd);
GameManager.DB.SaveDatas();
}
public void ClickShop()
{
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
CanvasControl.Ins.Go_Shop();
GameManager.UI.HideTopPopup();
}
public void ClickMilgi()
{
if (!_gameResult)
GameManager.ADS.ShowInterstitialAd(Set_Milgi);
else
Set_Milgi();
}
void Set_Milgi()
{
var curgold = GameManager.DB.GetRemainigNormalGameAIGold();
GameManager.DB.AddGoldToAI(false, _gameResult ? enemyBeforeGold - curgold : curgold - enemyBeforeGold);
var mygold = GameManager.DB.Gold;
GameManager.DB.AddGold(_gameResult ? -(mygold - myBeforeGold) : -(myBeforeGold - mygold), name);
GameManager.DB.SaveDatas();
GamePanel.Instance.AddMultiplyType(EScoreMutiplyType.ClickedFromResultPopup);
GamePanel.Instance.Player_Milgi = _gameResult ? 1 : 2;
ClickNextGame();
}
public void ClickHome()
{
GameManager.Sound.PlaySFX(ESFXType.Button_Hit);
@ -395,10 +439,12 @@ public class ResultPopup : PopupBase
GameManager.Event.InvokeEvent(EEventType.OnReturnToHome);
}
GameManager.UI.HideTopPopup();
GamePanel.Instance.Player_Milgi = 0;
}
public void ClickNext()
{
GamePanel.Instance.Player_Milgi = 0;
if (GamePanel.Instance.IsChallengeMode)
{
BGId huntingDataID = GameManager.BGDatabase.GetLastUnolockHuntingDataID();

View File

@ -208,14 +208,15 @@ namespace CodeJay
public enum EScoreMutiplyType
{
Go,
Gobak,
Peebak,
Gwhangbak,
Shake,
Nagari,
ClickedFromResultPopup,
Meongbak,
ClickedFromResultPopup, // 밀기
Meongbak, // 멍박
Max
}

View File

@ -108,6 +108,8 @@ namespace CodeJay
{
switch (type)
{
case EScoreMutiplyType.Go:
return 2;
case EScoreMutiplyType.Gobak:
return 2;
case EScoreMutiplyType.Peebak: