37 lines
792 B
C#
37 lines
792 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Events;
|
|
using UnityEngine.UI;
|
|
|
|
namespace TcgEngine
|
|
{
|
|
public class ChangeCoverLine : MonoBehaviour
|
|
{
|
|
public Image cover;
|
|
public string coverName;
|
|
|
|
public UnityAction<ChangeCoverLine> OnChangeCover;
|
|
|
|
/// <summary>
|
|
/// 初始化封面显示
|
|
/// </summary>
|
|
public void SetCover(Sprite coverSprite, string name)
|
|
{
|
|
if (cover != null)
|
|
cover.sprite = coverSprite;
|
|
|
|
coverName = name;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 点击选择封面
|
|
/// </summary>
|
|
public void OnClickCover()
|
|
{
|
|
OnChangeCover?.Invoke(this);
|
|
}
|
|
}
|
|
}
|
|
|