mirror of
https://github.com/lllyasviel/YGOProUnity_V2.git
synced 2026-10-18 22:50:56 +08:00
26 lines
704 B
C#
26 lines
704 B
C#
using UnityEngine;
|
|
public class OpenCardOnClick : MonoBehaviour
|
|
{
|
|
void OnClick()
|
|
{
|
|
UILabel lbl = GetComponent<UILabel>();
|
|
|
|
if (lbl != null)
|
|
{
|
|
try
|
|
{
|
|
string s = lbl.GetUrlAtPosition(UICamera.lastWorldPosition);
|
|
if (string.IsNullOrEmpty(s))
|
|
{
|
|
return;
|
|
}
|
|
int code = int.Parse(s);
|
|
((CardDescription)(Program.I().cardDescription)).setData(YGOSharp.CardsManager.Get(code), GameTextureManager.myBack,"",true);
|
|
}
|
|
catch (System.Exception e)
|
|
{
|
|
Debug.Log(e);
|
|
}
|
|
}
|
|
}
|
|
} |