WXMC/.svn/pristine/23/23874fc31721c8d4757165ae2a97d70341f63a65.svn-base
2024-12-04 16:18:46 +08:00

28 lines
756 B
Plaintext

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class PuzzleDrawTarotItem : MonoBehaviour
{
[SerializeField]
private Text Text_DrawTarotName;
[SerializeField]
private Button Btn_SelectBtn;
private PuzzleDrawTarot currPuzzleDrawTarot;
private Action<PuzzleDrawTarot> selectAc;
public void Init(PuzzleDrawTarot PuzzleDrawTarot,Action<PuzzleDrawTarot> selectAction)
{
selectAc = selectAction;
currPuzzleDrawTarot = PuzzleDrawTarot;
Text_DrawTarotName.text = currPuzzleDrawTarot.DisplayName;
Btn_SelectBtn.onClick.AddListener(SelectItem);
}
void SelectItem()
{
selectAc(currPuzzleDrawTarot);
}
}