Home > other >  Achieve unity "the use of number time limit" function
Achieve unity "the use of number time limit" function

Time:09-17

int count=0;
Void the Start ()
{
//limit number of local access exe
If (PlayerPrefs. Get int (" count ") & gt; 30)
{
Application. The Quit ();
}
Count=PlayerPrefs. Get int (" count ");
The count +=1;
PlayerPrefs. SetInt (" count ", count);
}
Void the Update ()
{
//limit time
If (System. A DateTime. Today. Year & gt; 2019)
{
Application. The Quit ();
}
The else
{
If (System. A DateTime. Today. The Month & gt; 3)
{
Application. The Quit ();
}
The else
{
If (System. A DateTime. Today. Day & gt; 31)
{
Application. The Quit ();
}
}
}
}

CodePudding user response:

Do you want to achieve what effect?
  • Related