using DG.Tweening; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; [System.Serializable] public class MengyaoCardData { [Tooltip("萌妖卡ID")] public string cardID; [Tooltip("萌妖卡预制体")] public GameObject cardPrefab; } public class cardBox : Base { public static cardBox instance; [HideInInspector] public int mengyaoNumber = 0;//萌妖数量 [HideInInspector] public int inPlaceNumber = 0; [Header("开始按钮obj")] public GameObject btnObj; [Header("怪物信息提示按钮obj")] public GameObject IconTipObj; [Header("萌妖卡数据列表")] public List mengyaoCardDataList = new List(); [Header("萌妖卡生成父节点")] public Transform parentPos; public float scaleUpDuration = 0.5f; // 缩放动画时长 public float fadeInDuration = 0.5f; // 淡入动画时长 // ID到萌妖卡预制体的映射字典 private Dictionary IDTomangyaoPrefab = new Dictionary(); //public Dictionary [HideInInspector] public List card = new List(); private void Awake() { instance = this; } void Start() { if (btnObj == null) { Debug.LogError("btnObj==null"); return; } btnObj.SetActive(false); InitializeDictionary(); Init(); mengyaoNumber = Base.GlobalObj.GetComponent().CarryCardId.Count; } public void ChangeInPlaceNumber(int number) { inPlaceNumber += number; if (inPlaceNumber == mengyaoNumber) { gameGlobal.GameStart(); //Debug.Log("布置完成"); btnObj.SetActive(true); btnObj.GetComponent