using System.Collections; using System.Collections.Generic; using System.IO; using Newtonsoft.Json.Linq; using UnityEngine; using UnityEngine.Networking; using UnityEngine.UI; public class PuzzleExplainUI : MonoBehaviour { [SerializeField] private PuzzleCardExplainItem m_cardExplainItemPrefab; [SerializeField] private Transform m_cardExplainItemParent; [SerializeField] private HorizontalLayoutGroup m_horizontalLayoutGroup; [SerializeField] private Transform m_bg; [SerializeField] public GameObject questionBoard; private List puzzleCardItemList; private List puzzleTarotCardList; private JArray cards; public void Init(List puzzleTarotCardItemList) { GetTextData(); puzzleTarotCardList = puzzleTarotCardItemList; m_horizontalLayoutGroup.enabled = true; gameObject.SetActive(true); if(puzzleCardItemList==null) { puzzleCardItemList= new List(); } for(int j=0;j(); string currContent = GetTextWithType(puzzleTarotCardItemList[j].TarotCard); currItem.Init(puzzleTarotCardItemList[j],currContent,ShowQuestionUI); puzzleCardItemList.Add(currItem); } StartCoroutine(DelaySetLayoutDisable()); } IEnumerator DelaySetLayoutDisable() { yield return new WaitForSeconds(0.1f); m_horizontalLayoutGroup.enabled = false; for(int j=0;j().cardExplainItem =cardExplainItem; } public void Exit() { if(PHomeInventory.instance!=null) { for(int j=0;j