public void OnClick() //
{
gameDay++;
if (gameMonth == 1 && gameDay > 31 || gameMonth == 3 && gameDay > 31 || gameMonth == 4 && gameDay > 30 || gameMonth == 5 && gameDay > 31 || gameMonth == 6 && gameDay > 30 || gameMonth == 7 && gameDay > 31 || gameMonth == 8 && gameDay > 31 || gameMonth == 9 && gameDay > 30 || gameMonth == 10 && gameDay > 31 || gameMonth == 11 && gameDay > 30)
{
gameDay = 1;
gameMonth++;
}
if (gameMonth == 2)
{
if (gameLeapYear == 0)
{
if (gameDay > 29)
{
gameDay = 1;
gameMonth++;
}
}
else
{
if (gameDay > 28)
{
gameDay = 1;
gameMonth++;
}
}
}
if (gameMonth == 12 && gameDay > 31)
{
gameDay = 1;
gameMonth = 1;
gameYear++;
gameLeapYear++;
}
if (gameLeapYear > 3)
{
gameLeapYear = 0;
}
}