Files
lllyasviel a770eb4182 fix 21 bugs
2017-07-24 22:31:14 +08:00

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);
}
}
}
}