흔들기 예외처리
This commit is contained in:
parent
9d4c66b119
commit
7b7554e9dd
|
|
@ -1,29 +1,29 @@
|
||||||
using CodeJay.Enum;
|
using CodeJay.Enum;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class ShakePopup : PopupBase
|
public class ShakePopup : PopupBase
|
||||||
{
|
{
|
||||||
[SerializeField] private UnityEngine.UI.Image[] Images;
|
[SerializeField] private UnityEngine.UI.Image[] Images;
|
||||||
private ECardType[] cardTypes;
|
|
||||||
public void SetData(ECardType[] cardTypes, bool fourCard)
|
public void SetData(ECardType[] cardTypes, bool fourCard)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Images.Length; i++)
|
if (cardTypes != null && cardTypes.Length == Images.Length)
|
||||||
{
|
for (int i = 0; i < Images.Length; i++)
|
||||||
if (i == Images.Length - 1)
|
|
||||||
{
|
{
|
||||||
if (fourCard)
|
if (i == Images.Length - 1)
|
||||||
{
|
{
|
||||||
Images[i].gameObject.SetActive(true);
|
if (fourCard)
|
||||||
Images[i].sprite = GameManager.Resource.GetSprite(cardTypes[i]);
|
{
|
||||||
|
Images[i].gameObject.SetActive(true);
|
||||||
|
Images[i].sprite = GameManager.Resource.GetSprite(cardTypes[i]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Images[i].gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Images[i].gameObject.SetActive(false);
|
Images[i].sprite = GameManager.Resource.GetSprite(cardTypes[i]);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Images[i].sprite = GameManager.Resource.GetSprite(cardTypes[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
StartCoroutine(coroHide());
|
StartCoroutine(coroHide());
|
||||||
GameManager.Sound.PlaySFX(ESFXType.Open_Popup);
|
GameManager.Sound.PlaySFX(ESFXType.Open_Popup);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue