메인 미션 완료
This commit is contained in:
parent
303ac7895f
commit
58a052e2b2
|
|
@ -298,6 +298,8 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 5349872405586130481}
|
- component: {fileID: 5349872405586130481}
|
||||||
|
- component: {fileID: 978417483280642607}
|
||||||
|
- component: {fileID: 5311391927235214503}
|
||||||
- component: {fileID: 5349872405586130483}
|
- component: {fileID: 5349872405586130483}
|
||||||
- component: {fileID: 5349872405586130492}
|
- component: {fileID: 5349872405586130492}
|
||||||
- component: {fileID: 5349872405586130493}
|
- component: {fileID: 5349872405586130493}
|
||||||
|
|
@ -329,6 +331,34 @@ RectTransform:
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &978417483280642607
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5349872405586130486}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2afb405be3672534ba3006b07de45563, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
t_mission: {fileID: 8643226524284132482}
|
||||||
|
--- !u!114 &5311391927235214503
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5349872405586130486}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 13838897d1263dc4fac5200f1ca5878d, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_ScrollRect: {fileID: 0}
|
||||||
|
m_Content: {fileID: 4559414874285890658}
|
||||||
|
go_card: {fileID: 8311175157444695672, guid: 663e18f98f297f547a0729aca0f70b7e, type: 3}
|
||||||
--- !u!222 &5349872405586130483
|
--- !u!222 &5349872405586130483
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -715,7 +745,7 @@ GameObject:
|
||||||
- component: {fileID: 8643226524284132493}
|
- component: {fileID: 8643226524284132493}
|
||||||
- component: {fileID: 8643226524284132482}
|
- component: {fileID: 8643226524284132482}
|
||||||
m_Layer: 5
|
m_Layer: 5
|
||||||
m_Name: t_rate
|
m_Name: t_mission
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -44,7 +44,6 @@ public enum EPopupType
|
||||||
PreViewPopup,
|
PreViewPopup,
|
||||||
PreViewUIPopup,
|
PreViewUIPopup,
|
||||||
MissionOpenPopup,
|
MissionOpenPopup,
|
||||||
MissionSuccessPopup,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum EGraphicRaycasterType
|
public enum EGraphicRaycasterType
|
||||||
|
|
@ -112,8 +111,8 @@ public class UIManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
//else
|
||||||
HideTopPopup();
|
// HideTopPopup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
@ -397,8 +396,6 @@ public class UIManager : MonoBehaviour
|
||||||
return Instantiate(Resources.Load<PopupBase>(path + "PreViewUIPopup"), PopupCanvasTransform);
|
return Instantiate(Resources.Load<PopupBase>(path + "PreViewUIPopup"), PopupCanvasTransform);
|
||||||
case EPopupType.MissionOpenPopup:
|
case EPopupType.MissionOpenPopup:
|
||||||
return Instantiate(Resources.Load<PopupBase>(path + "MissionOpenPopup"), PopupCanvasTransform);
|
return Instantiate(Resources.Load<PopupBase>(path + "MissionOpenPopup"), PopupCanvasTransform);
|
||||||
case EPopupType.MissionSuccessPopup:
|
|
||||||
return Instantiate(Resources.Load<PopupBase>(path + "MissionSuccessPopup"), PopupCanvasTransform);
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ public partial class GamePanel : MonoBehaviour
|
||||||
public TMPro.TextMeshProUGUI AINameTMP, t_PointMoney;
|
public TMPro.TextMeshProUGUI AINameTMP, t_PointMoney;
|
||||||
public TMPro.TextMeshProUGUI AIGoldTMP;
|
public TMPro.TextMeshProUGUI AIGoldTMP;
|
||||||
private List<CardSlot> _lstCardSlots;
|
private List<CardSlot> _lstCardSlots;
|
||||||
|
public MissionOpenPopup_Main m_MissionOpenPopup_Main;
|
||||||
|
public MissionOpenPopup_Sub m_MissionOpenPopup_Sub;
|
||||||
|
|
||||||
private int _prevScore_Player = 0;
|
private int _prevScore_Player = 0;
|
||||||
private int _prevScore_AI = 0;
|
private int _prevScore_AI = 0;
|
||||||
|
|
@ -77,7 +79,9 @@ public partial class GamePanel : MonoBehaviour
|
||||||
{ eSubMission.Be3Gwang, 2 }
|
{ eSubMission.Be3Gwang, 2 }
|
||||||
};
|
};
|
||||||
public eMainMission CurMission = eMainMission.Max;
|
public eMainMission CurMission = eMainMission.Max;
|
||||||
|
bool ShowMainMissionPopup = false;
|
||||||
public eSubMission CurSubMission = eSubMission.Max;
|
public eSubMission CurSubMission = eSubMission.Max;
|
||||||
|
bool ShowSubMissionPopup = false;
|
||||||
|
|
||||||
#region MonoBehaviour
|
#region MonoBehaviour
|
||||||
private void Awake()
|
private void Awake()
|
||||||
|
|
@ -289,6 +293,8 @@ public partial class GamePanel : MonoBehaviour
|
||||||
case EScoreMutiplyType.Nagari:
|
case EScoreMutiplyType.Nagari:
|
||||||
case EScoreMutiplyType.ClickedFromResultPopup:
|
case EScoreMutiplyType.ClickedFromResultPopup:
|
||||||
case EScoreMutiplyType.MeongTeonguri:
|
case EScoreMutiplyType.MeongTeonguri:
|
||||||
|
case EScoreMutiplyType.MainMission:
|
||||||
|
case EScoreMutiplyType.SubMission:
|
||||||
_hashScoreMultiplyTypes.Add(type);
|
_hashScoreMultiplyTypes.Add(type);
|
||||||
break;
|
break;
|
||||||
case EScoreMutiplyType.Max:
|
case EScoreMutiplyType.Max:
|
||||||
|
|
@ -400,6 +406,9 @@ public partial class GamePanel : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
GameManager.UI.ShowNStackPopup(EPopupType.MissionOpenPopup);
|
GameManager.UI.ShowNStackPopup(EPopupType.MissionOpenPopup);
|
||||||
|
|
||||||
|
m_MissionOpenPopup_Main.gameObject.SetActive(true);
|
||||||
|
m_MissionOpenPopup_Sub.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -413,6 +422,9 @@ public partial class GamePanel : MonoBehaviour
|
||||||
private void Initialize()
|
private void Initialize()
|
||||||
{
|
{
|
||||||
GameManager.Sound.PlayBGM(EBGMType.BGM_2);
|
GameManager.Sound.PlayBGM(EBGMType.BGM_2);
|
||||||
|
m_MissionOpenPopup_Main.gameObject.SetActive(false);
|
||||||
|
m_MissionOpenPopup_Sub.gameObject.SetActive(false);
|
||||||
|
ShowMainMissionPopup = ShowSubMissionPopup = false;
|
||||||
IsPreview = UseSepYulgget_To_Pee = false;
|
IsPreview = UseSepYulgget_To_Pee = false;
|
||||||
this.GamePanelEnabled(true);
|
this.GamePanelEnabled(true);
|
||||||
go_toppanel.SetActive(false);
|
go_toppanel.SetActive(false);
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ using CodeJay.Enum;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
@ -21,7 +22,7 @@ public class CardTypeComparer : IComparer<ECardType>
|
||||||
public partial class GamePanel : MonoBehaviour
|
public partial class GamePanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
private const int FLOOR_CARD_STACK = 6;
|
private const int FLOOR_CARD_STACK = 6;
|
||||||
|
MissionSuccessPopup m_MissionSuccessPopup;
|
||||||
|
|
||||||
public static void ListInitialize(ref List<ECardType> list, int length)
|
public static void ListInitialize(ref List<ECardType> list, int length)
|
||||||
{
|
{
|
||||||
|
|
@ -575,6 +576,28 @@ public partial class GamePanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
ECardScoreType scoreType = Converter.CardTypeToScoreType(type);
|
ECardScoreType scoreType = Converter.CardTypeToScoreType(type);
|
||||||
_lstPlayerScoreCards.Add(type);
|
_lstPlayerScoreCards.Add(type);
|
||||||
|
|
||||||
|
// 메인 미션 체크
|
||||||
|
if (CurMission != eMainMission.Max)
|
||||||
|
{
|
||||||
|
if (!ShowMainMissionPopup &&
|
||||||
|
MissionOpenPopup_Main.MissionCards.All(card => _lstPlayerScoreCards.Contains(card)))
|
||||||
|
{
|
||||||
|
AddMultiplyType(EScoreMutiplyType.MainMission);
|
||||||
|
ShowMainMissionPopup = MissionSuccessPopup.isMain = true;
|
||||||
|
if (m_MissionSuccessPopup == null)
|
||||||
|
{
|
||||||
|
string path = ResourceManager.PREFAB_PATH + "Popups/";
|
||||||
|
m_MissionSuccessPopup = Instantiate(Resources.Load<MissionSuccessPopup>(path + "MissionSuccessPopup"), GameManager.UI.PopupCanvasTransform);
|
||||||
|
}
|
||||||
|
m_MissionSuccessPopup.Set();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 서브 미션 체크
|
||||||
|
if (CurSubMission != eSubMission.Max)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
switch (scoreType)
|
switch (scoreType)
|
||||||
{
|
{
|
||||||
case ECardScoreType.Ghwang:
|
case ECardScoreType.Ghwang:
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,16 @@ public class MissionOpenPopup_Main : uScrollViewMgr
|
||||||
{
|
{
|
||||||
public TextMeshProUGUI t_rate;
|
public TextMeshProUGUI t_rate;
|
||||||
|
|
||||||
|
public static List<ECardType> MissionCards;
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
t_rate.text = $"x{GamePanel.Instance.dic_missionRate[GamePanel.Instance.CurMission]}";
|
t_rate.text = $"x{GamePanel.Instance.dic_missionRate[GamePanel.Instance.CurMission]}";
|
||||||
Set_ScrollView(Get_ShowUICards(GamePanel.Instance.CurMission));
|
MissionCards = Get_ShowUICards(GamePanel.Instance.CurMission);
|
||||||
|
Set_ScrollView(MissionCards);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ECardType> Get_ShowUICards(eMainMission mission)
|
public List<ECardType> Get_ShowUICards(eMainMission mission)
|
||||||
{
|
{
|
||||||
List<ECardType> lst = new List<ECardType>();
|
List<ECardType> lst = new List<ECardType>();
|
||||||
switch (mission)
|
switch (mission)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
public class MissionSuccessPopup_Set : uScrollViewMgr
|
||||||
|
{
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
if (MissionSuccessPopup.isMain)
|
||||||
|
{
|
||||||
|
Set_ScrollView(MissionOpenPopup_Main.MissionCards);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CardBase_AllOff();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 13838897d1263dc4fac5200f1ca5878d
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System.Collections;
|
||||||
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class MissionSuccessPopup : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static bool isMain;
|
||||||
|
|
||||||
|
public TextMeshProUGUI t_mission;
|
||||||
|
|
||||||
|
public void Set()
|
||||||
|
{
|
||||||
|
gameObject.SetActive(true);
|
||||||
|
GameManager.Sound.PlaySFX(ESFXType.Open_Popup);
|
||||||
|
StartCoroutine(Co_Off());
|
||||||
|
|
||||||
|
t_mission.text = isMain ? $"메인미션 x{GamePanel.Instance.dic_missionRate[GamePanel.Instance.CurMission]}" :
|
||||||
|
$"서브미션 x{GamePanel.Instance.dic_submisstionRate[GamePanel.Instance.CurSubMission]}";
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator Co_Off()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(2.5f);
|
||||||
|
gameObject.SetActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2afb405be3672534ba3006b07de45563
|
||||||
|
|
@ -103,15 +103,16 @@ public class ResultPopup : PopupBase
|
||||||
int goNumer = GamePanel.Instance.Player_Go;
|
int goNumer = GamePanel.Instance.Player_Go;
|
||||||
string str = $"{score}점";
|
string str = $"{score}점";
|
||||||
int multiply = 0;
|
int multiply = 0;
|
||||||
|
int mission_mul = 0;
|
||||||
|
|
||||||
if (goNumer == 1)
|
if (goNumer == 1)
|
||||||
{
|
{
|
||||||
str += " + 1고(1점) ";
|
str += " + 1고(1점)";
|
||||||
score += 1;
|
score += 1;
|
||||||
}
|
}
|
||||||
else if (goNumer == 2)
|
else if (goNumer == 2)
|
||||||
{
|
{
|
||||||
str += " + 2고(2점) ";
|
str += " + 2고(2점)";
|
||||||
score += 2;
|
score += 2;
|
||||||
}
|
}
|
||||||
else if (goNumer >= 3)
|
else if (goNumer >= 3)
|
||||||
|
|
@ -135,16 +136,35 @@ public class ResultPopup : PopupBase
|
||||||
val *= GamePanel.Instance.Player_Milgi;
|
val *= GamePanel.Instance.Player_Milgi;
|
||||||
else if (multipleType[i] == EScoreMutiplyType.Go)
|
else if (multipleType[i] == EScoreMutiplyType.Go)
|
||||||
val *= goNumer - 2;
|
val *= goNumer - 2;
|
||||||
|
|
||||||
|
if (multipleType[i] == EScoreMutiplyType.MainMission || multipleType[i] == EScoreMutiplyType.SubMission)
|
||||||
|
{
|
||||||
|
if (mission_mul == 0) mission_mul = val;
|
||||||
|
else mission_mul *= val;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
multiply *= val;
|
multiply *= val;
|
||||||
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (multiply > 0)
|
if (multiply > 0 && mission_mul > 0)
|
||||||
|
{
|
||||||
|
t_Cal.text = str + $" x {multiply}배\nx {mission_mul}배(미션) = 총 {score * multiply * mission_mul}점\n";
|
||||||
|
_resultTotalGold = score * multiply * mission_mul * GamePanel.Instance.Stake;
|
||||||
|
}
|
||||||
|
else if (multiply > 0)
|
||||||
{
|
{
|
||||||
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;
|
_resultTotalGold = score * multiply * GamePanel.Instance.Stake;
|
||||||
}
|
}
|
||||||
|
else if (mission_mul > 0)
|
||||||
|
{
|
||||||
|
t_Cal.text = str + $" x {mission_mul}배(미션)\n= 총 {score * mission_mul}점\n";
|
||||||
|
_resultTotalGold = score * mission_mul * GamePanel.Instance.Stake;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
t_Cal.text = str + $" \n= 총 {score}점\n";
|
t_Cal.text = str + $" \n= 총 {score}점\n";
|
||||||
|
|
@ -254,13 +274,15 @@ public class ResultPopup : PopupBase
|
||||||
|
|
||||||
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
var val = CodeJay.CodeJayUtility.Utility.GetScoreMultiplyValue(multipleType[i]);
|
||||||
if (multipleType[i] == EScoreMutiplyType.Shake)
|
if (multipleType[i] == EScoreMutiplyType.Shake)
|
||||||
val *= GamePanel.Instance.Player_Bell;
|
val *= GamePanel.Instance.AI_Bell;
|
||||||
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
|
else if (multipleType[i] == EScoreMutiplyType.ClickedFromResultPopup)
|
||||||
val *= GamePanel.Instance.Player_Milgi;
|
val *= GamePanel.Instance.Player_Milgi;
|
||||||
else if (multipleType[i] == EScoreMutiplyType.Go)
|
else if (multipleType[i] == EScoreMutiplyType.Go)
|
||||||
val *= goNumer - 2;
|
val *= goNumer - 2;
|
||||||
multiply *= val;
|
multiply *= val;
|
||||||
list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
|
||||||
|
if (multipleType[i] == EScoreMutiplyType.MainMission || multipleType[i] == EScoreMutiplyType.SubMission) { }
|
||||||
|
else list_xinfo.Find(f => f.type == multipleType[i]).mul = val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,10 @@ namespace CodeJay
|
||||||
Nagari,
|
Nagari,
|
||||||
ClickedFromResultPopup, // 밀기
|
ClickedFromResultPopup, // 밀기
|
||||||
MeongTeonguri, // 멍텅구리
|
MeongTeonguri, // 멍텅구리
|
||||||
|
|
||||||
|
MainMission,
|
||||||
|
SubMission,
|
||||||
|
|
||||||
Max
|
Max
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,10 @@ namespace CodeJay
|
||||||
return 2;
|
return 2;
|
||||||
case EScoreMutiplyType.MeongTeonguri:
|
case EScoreMutiplyType.MeongTeonguri:
|
||||||
return 2;
|
return 2;
|
||||||
|
case EScoreMutiplyType.MainMission:
|
||||||
|
return GamePanel.Instance.dic_missionRate[GamePanel.Instance.CurMission];
|
||||||
|
case EScoreMutiplyType.SubMission:
|
||||||
|
return GamePanel.Instance.dic_submisstionRate[GamePanel.Instance.CurSubMission];
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue