미션보기 및 앨범 드래그
This commit is contained in:
parent
b26c102de9
commit
3f8f50a0e5
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,4 @@
|
|||
using CodeJay.Enum;
|
||||
using NUnit.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
|
@ -18,14 +17,12 @@ public partial class GamePanel : MonoBehaviour
|
|||
public static float GameSpeed = 1f;
|
||||
public static GamePanel Instance;
|
||||
|
||||
public GameObject CardSlotPrefab, go_toppanel, go_previewbtn;
|
||||
public GameObject CardSlotPrefab, go_toppanel, go_previewbtn, go_missionbtn;
|
||||
public CanvasGroup cg;
|
||||
public Image i_ai;
|
||||
public TMPro.TextMeshProUGUI AINameTMP, t_PointMoney;
|
||||
public TMPro.TextMeshProUGUI AIGoldTMP;
|
||||
private List<CardSlot> _lstCardSlots;
|
||||
public MissionOpenPopup_Main m_MissionOpenPopup_Main;
|
||||
public MissionOpenPopup_Sub m_MissionOpenPopup_Sub;
|
||||
|
||||
private int _prevScore_Player = 0;
|
||||
private int _prevScore_AI = 0;
|
||||
|
|
@ -393,7 +390,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
void Set_Mission()
|
||||
{
|
||||
if (DSUtil.RandomTrue(0.1f + GameManager.DB.MissionAddRate))
|
||||
//if (true) // 테스트 : 미션 100%
|
||||
//if (true) // 테스트 : 미션 100%
|
||||
{
|
||||
GameManager.DB.Set_Mission(false);
|
||||
|
||||
|
|
@ -415,29 +412,33 @@ public partial class GamePanel : MonoBehaviour
|
|||
CurSubMission = keys[rand.Next(keys.Count)];
|
||||
}
|
||||
|
||||
MissionOpenPopup.NeedBtn = true;
|
||||
GameManager.UI.ShowNStackPopup(EPopupType.MissionOpenPopup);
|
||||
|
||||
// TODO 정인호 : 승우님이 변경한다고 하셔서 일단 미션 UI 끔
|
||||
//m_MissionOpenPopup_Main.gameObject.SetActive(true);
|
||||
//m_MissionOpenPopup_Sub.gameObject.SetActive(true);
|
||||
go_missionbtn.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurMission = eMainMission.Max;
|
||||
CurSubMission = eSubMission.Max;
|
||||
GameManager.DB.Set_Mission(true);
|
||||
go_missionbtn.SetActive(false);
|
||||
}
|
||||
|
||||
go_previewbtn.SetActive(true);
|
||||
}
|
||||
|
||||
public void OnClick_Mission()
|
||||
{
|
||||
MissionOpenPopup.NeedBtn = false;
|
||||
GameManager.UI.ShowNStackPopup(EPopupType.MissionOpenPopup);
|
||||
}
|
||||
|
||||
#region Core
|
||||
private void Initialize()
|
||||
{
|
||||
GameManager.Sound.PlayBGM(EBGMType.BGM_2);
|
||||
go_previewbtn.SetActive(false);
|
||||
m_MissionOpenPopup_Main.gameObject.SetActive(false);
|
||||
m_MissionOpenPopup_Sub.gameObject.SetActive(false);
|
||||
go_missionbtn.SetActive(false);
|
||||
ShowMainMissionPopup = ShowSubMissionPopup = false;
|
||||
IsPreview = UseSepYulgget_To_Pee = false;
|
||||
this.GamePanelEnabled(true);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
{
|
||||
switch (_flipCenterState)
|
||||
{
|
||||
// 카드를 뒤집는다.
|
||||
// ī<EFBFBD>带 <20><><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>.
|
||||
case EFlipCenterState.FlipCenterCard:
|
||||
{
|
||||
for (int i = 0; i < _lstCardSlots.Count; i++)
|
||||
|
|
@ -48,7 +48,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
// 보너스 카드라면
|
||||
// <EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD> ī<><C4AB><EFBFBD><EFBFBD>
|
||||
if (_flipedCardSlot.CardType == ECardType.Bonus_1 || _flipedCardSlot.CardType == ECardType.Bonus_2 || _flipedCardSlot.CardType == ECardType.Bonus_3)
|
||||
{
|
||||
RectTransform rt = null;
|
||||
|
|
@ -68,12 +68,12 @@ public partial class GamePanel : MonoBehaviour
|
|||
_lstAvailableCardTypes.Add(_flipedCardSlot.CardType);
|
||||
_delay = CardSlot.TWEEN_FROM_CENTER_TO_FLOOR;
|
||||
}
|
||||
// 중앙 카드덱에서 뒤집은 카드가 '뒤집기' 카드라면
|
||||
// <EFBFBD>߾<EFBFBD> ī<>嵦<EFBFBD><E5B5A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<>尡 '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ī<><C4AB><EFBFBD><EFBFBD>
|
||||
else if (_flipedCardSlot.CardType == ECardType.FlipCard_1 || _flipedCardSlot.CardType == ECardType.FlipCard_2)
|
||||
{
|
||||
LogicalError($"{nameof(FlipCenterStateMachine)} Fliped Card Can't be FlipCard_1 or FlipCard_2");
|
||||
}
|
||||
// 제출한 카드와 중앙 카드덱에서 뒤집은 카드의 '월'이 일치한다면
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<><C4AB><EFBFBD> <20>߾<EFBFBD> ī<>嵦<EFBFBD><E5B5A6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<><C4AB><EFBFBD><EFBFBD> '<27><>'<27><> <20><>ġ<EFBFBD>Ѵٸ<D1B4>
|
||||
else if (_discardSlot != null && _discardSlot.MonthType == _flipedCardSlot.MonthType)
|
||||
{
|
||||
GameManager.Sound.ReserveSFX(ESFXType.FlipCard_Hit, CardSlot.TWEEN_DURATION);
|
||||
|
|
@ -82,7 +82,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
_flipCenterState = EFlipCenterState.MatchedWithDiscardType;
|
||||
_delay = CardSlot.TWEEN_FROM_CENTER_TO_FLOOR;
|
||||
}
|
||||
// 그 외
|
||||
// <EFBFBD><EFBFBD> <20><>
|
||||
else
|
||||
{
|
||||
GameManager.Sound.ReserveSFX(ESFXType.Card_NoHit, CardSlot.TWEEN_DURATION);
|
||||
|
|
@ -97,7 +97,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
{
|
||||
var matchedFloorCards = GetMatchedCardSlots(ECardLocationType.Floor, _flipedCardSlot.MonthType);
|
||||
|
||||
// 뻑 먹기
|
||||
// <EFBFBD><EFBFBD> <20>Ա<EFBFBD>
|
||||
if (matchedFloorCards.Count == 4)
|
||||
{
|
||||
EEffectDirectType effectType = EEffectDirectType.Max;
|
||||
|
|
@ -127,7 +127,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
for (int i = 0; i < matchedFloorCards.Count; i++)
|
||||
_lstAvailableCardTypes.Add(matchedFloorCards[i].CardType);
|
||||
|
||||
// 같이 있던 보너스카드도 가져온다.
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>ʽ<EFBFBD>ī<EFBFBD>嵵 <20><><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>.
|
||||
if (_dicReservedBonusCard.ContainsKey(ECardType.Bonus_1))
|
||||
{
|
||||
if (_dicReservedBonusCard[ECardType.Bonus_1] == _flipedCardSlot.MonthType)
|
||||
|
|
@ -149,13 +149,13 @@ public partial class GamePanel : MonoBehaviour
|
|||
_flipCenterIndex = 0;
|
||||
_flipCenterState = EFlipCenterState.Complete;
|
||||
}
|
||||
// 선택할 수 있다.
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
||||
else if (matchedFloorCards.Count == 3)
|
||||
{
|
||||
ECardType leftCard = ECardType.Max;
|
||||
ECardType rightCard = ECardType.Max;
|
||||
|
||||
// 선택할 카드 셋팅
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<><C4AB> <20><><EFBFBD><EFBFBD>
|
||||
for (int i = 0; i < matchedFloorCards.Count; i++)
|
||||
{
|
||||
if (matchedFloorCards[i].CardType == _flipedCardSlot.CardType)
|
||||
|
|
@ -176,7 +176,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
bool isDoublePee_left = CodeJay.CodeJayUtility.Utility.IsDoublePee(leftCard, UseSepYulgget_To_Pee);
|
||||
bool isDoublePee_right = CodeJay.CodeJayUtility.Utility.IsDoublePee(rightCard, UseSepYulgget_To_Pee);
|
||||
|
||||
// 쌍피가 아니고 고를 카드가 둘 다 '피' 일 때
|
||||
// <EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD> <20>ƴϰ<C6B4> <20><><EFBFBD> ī<>尡 <20><> <20><> '<27><>' <20><> <20><>
|
||||
if (isDoublePee_left == false && isDoublePee_right == false && leftScoreType == ECardScoreType.Pee && rightScoreType == ECardScoreType.Pee)
|
||||
{
|
||||
CardSelectCallback_Flip(Random.Range(0, 2) == 0 ? leftCard : rightCard);
|
||||
|
|
@ -201,14 +201,14 @@ public partial class GamePanel : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
// 바닥패와 매치됨
|
||||
// <EFBFBD>ٴ<EFBFBD><EFBFBD>п<EFBFBD> <20><>ġ<EFBFBD><C4A1>
|
||||
else if (matchedFloorCards.Count == 2)
|
||||
{
|
||||
_lstAvailableCardTypes.Add(matchedFloorCards[0].CardType);
|
||||
_lstAvailableCardTypes.Add(matchedFloorCards[1].CardType);
|
||||
_flipCenterState = EFlipCenterState.Complete;
|
||||
}
|
||||
// 매치되지 않음.
|
||||
// <EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
||||
else if (matchedFloorCards.Count == 1)
|
||||
{
|
||||
_flipCenterState = EFlipCenterState.Complete;
|
||||
|
|
@ -219,19 +219,19 @@ public partial class GamePanel : MonoBehaviour
|
|||
}
|
||||
}
|
||||
break;
|
||||
// 제출한 카드와 동일한 '월' 이라면
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<><C4AB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '<27><>' <20>̶<EFBFBD><CCB6>
|
||||
case EFlipCenterState.MatchedWithDiscardType:
|
||||
{
|
||||
int matchedCardNumber = GetMatchedCardSlotNumber(ECardLocationType.Floor, _flipedCardSlot.MonthType);
|
||||
|
||||
// 따닥!
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
|
||||
if (matchedCardNumber == 4)
|
||||
{
|
||||
EffectPanel.Direct(EEffectDirectType.Ddadak, PlayerTurn);
|
||||
_delay = EffectPanel.GetEffectDuration(EEffectDirectType.Ddadak);
|
||||
_dicBbug_State.Remove(_flipedCardSlot.MonthType);
|
||||
|
||||
// 중복되지 않도록 비워준다.
|
||||
// <EFBFBD>ߺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD>ش<EFBFBD>.
|
||||
_lstAvailableCardTypes.Clear();
|
||||
|
||||
for (int i = 0; i < _lstCardSlots.Count; i++)
|
||||
|
|
@ -239,7 +239,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
if (_lstCardSlots[i].MonthType == _flipedCardSlot.MonthType)
|
||||
_lstAvailableCardTypes.Add(_lstCardSlots[i].CardType);
|
||||
|
||||
// 바닥 패에 있는 자뻑했던 월 타입 카드들에 보너스카드가 있다면 가져올 수 있도록 추가한다.
|
||||
// <EFBFBD>ٴ<EFBFBD> <20>п<EFBFBD> <20>ִ<EFBFBD> <20>ڻ<EFBFBD><DABB>ߴ<EFBFBD> <20><> Ÿ<><C5B8> ī<><C4AB>鿡 <20><><EFBFBD>ʽ<EFBFBD>ī<EFBFBD>尡 <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20>߰<EFBFBD><DFB0>Ѵ<EFBFBD>.
|
||||
if (_dicReservedBonusCard.ContainsKey(_lstCardSlots[i].CardType) &&
|
||||
_dicReservedBonusCard[_lstCardSlots[i].CardType] == _flipedCardSlot.MonthType)
|
||||
{
|
||||
|
|
@ -250,7 +250,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
|
||||
_flipCenterState = EFlipCenterState.Complete;
|
||||
}
|
||||
// 뻑
|
||||
// <EFBFBD><EFBFBD>
|
||||
else if (matchedCardNumber == 3)
|
||||
{
|
||||
if (PlayerTurn)
|
||||
|
|
@ -270,7 +270,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
|
||||
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeGameData);
|
||||
|
||||
// 가져올 수 있도록 담아놨던 리스트를 비워준다.
|
||||
// <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20><>Ƴ<EFBFBD><C6B3><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>ش<EFBFBD>.
|
||||
_lstAvailableCardTypes.Clear();
|
||||
|
||||
_flipCenterState = EFlipCenterState.WaitforBbugDirect;
|
||||
|
|
@ -305,7 +305,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
}
|
||||
}
|
||||
break;
|
||||
// '뻑'연출을 기다린다.
|
||||
// '<EFBFBD><EFBFBD>'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ٸ<EFBFBD><D9B8><EFBFBD>.
|
||||
case EFlipCenterState.WaitforBbugDirect:
|
||||
if (PlayerTurn)
|
||||
{
|
||||
|
|
@ -332,14 +332,14 @@ public partial class GamePanel : MonoBehaviour
|
|||
}
|
||||
|
||||
break;
|
||||
// 첫뻑일경우 팝업이 열리기 때문에 기다린다.
|
||||
// ù<EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD><EFBFBD> <20>˾<EFBFBD><CBBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ٸ<EFBFBD><D9B8><EFBFBD>.
|
||||
case EFlipCenterState.WaitforBbugPopupClose:
|
||||
if (GameManager.UI.IsAnyPopupOpened() == false)
|
||||
{
|
||||
_flipCenterState = EFlipCenterState.Complete;
|
||||
}
|
||||
break;
|
||||
// 카드 선택을 기다린다.
|
||||
// ī<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ٸ<EFBFBD><D9B8><EFBFBD>.
|
||||
case EFlipCenterState.WaitForCardSelect:
|
||||
if (GameManager.UI.IsAnyPopupOpened() == false)
|
||||
{
|
||||
|
|
@ -353,7 +353,7 @@ public partial class GamePanel : MonoBehaviour
|
|||
_flipCenterState = EFlipCenterState.Complete;
|
||||
}
|
||||
break;
|
||||
// 완료
|
||||
// <EFBFBD>Ϸ<EFBFBD>
|
||||
case EFlipCenterState.Complete:
|
||||
{
|
||||
this._flipCenterIndex = 0;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using UnityEngine;
|
|||
|
||||
public class MissionOpenPopup : PopupBase
|
||||
{
|
||||
public static bool NeedBtn;
|
||||
public GameObject go_btn;
|
||||
|
||||
public override void ShowPopup(int drawOrder)
|
||||
|
|
@ -16,7 +17,8 @@ public class MissionOpenPopup : PopupBase
|
|||
{
|
||||
go_btn.SetActive(false);
|
||||
yield return new WaitForSeconds(2.5f);
|
||||
go_btn.SetActive(true);
|
||||
if (NeedBtn) go_btn.SetActive(true);
|
||||
else OnClick_OK();
|
||||
}
|
||||
|
||||
public void OnClick_OK()
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ public class CameraDragMove : MonoBehaviour
|
|||
|
||||
void ProcessInput(bool began, bool moved, bool ended, Vector3 position)
|
||||
{
|
||||
if (!m_ShowPanel.isFull) return;
|
||||
|
||||
if (began)
|
||||
{
|
||||
lastTouchPos = position;
|
||||
|
|
|
|||
|
|
@ -71,8 +71,11 @@ public class ShowPanel : MonoBehaviour
|
|||
m_Cam.transform.position = new Vector3(0f, 0f, -10f);
|
||||
break;
|
||||
case 4: // UI 다시 보이기
|
||||
isFull = false;
|
||||
go_btns.SetActive(true);
|
||||
if (isFull)
|
||||
{
|
||||
isFull = false;
|
||||
go_btns.SetActive(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue