int count = 0;
void Start()
{
//限制本地訪問exe次數
if (PlayerPrefs.GetInt("count") > 30)
{
Application.Quit();
}
count= PlayerPrefs.GetInt("count");
count+= 1;
PlayerPrefs.SetInt("count", count);
}
void Update()
{
//限制時間
if (System.DateTime.Today.Year > 2019)
{
Application.Quit();
}
else
{
if (System.DateTime.Today.Month > 3)
{
Application.Quit();
}
else
{
if (System.DateTime.Today.Day > 31)
{
Application.Quit();
}
}
}
}
uj5u.com熱心網友回復:
你想實作的是什么效果?轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/44110.html
標籤:Unity3D
上一篇:碰撞分離問題
