2025-05-09 10:20:30 +08:00

39 lines
965 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using ZXKFramework;
public class LocalLicenseDemo : MonoBehaviour
{
private Text text = null;
LocalLicenseManager localLicenseManager = new LocalLicenseManager();
void Start()
{
text = transform.FindFirst<Text>("TextTime");
transform.FindFirst<Button>("Btn").onClick.AddListener(localLicenseManager.OpenPath);
transform.FindFirst<Button>("BtnCreate").onClick.AddListener(localLicenseManager.CreateLicense);
localLicenseManager.callBack += (m, n) =>
{
text.text = n;
if (m)
{
}
};
if (!localLicenseManager.ReadLicence())
{
Game.Instance.tipManager.ShowTip("没有License 程序无法启动");
return;
}
}
void Update()
{
localLicenseManager?.Update();
}
}