Unity: How to track number of days in game

void Awake() {
        if (!GameSettings.hasLaunched)
            GameSettings.hasLaunched = true;
            if (PlayerPrefs.GetString("last_launch", "") == "")
                // first launch
                PlayerPrefs.SetString("last_launch", DateTime.Today.ToShortDateString());
                PlayerPrefs.SetInt("number_of_launch", 1);
                if (PlayerPrefs.GetString("last_launch", "") != DateTime.Today.ToShortDateString())
                    GameSettings.newDay = true;
                    PlayerPrefs.SetInt("number_of_launch", PlayerPrefs.GetInt("number_of_launch") + 1);
                PlayerPrefs.SetString("last_launch", DateTime.Today.ToShortDateString());
if (GameSettings.newDay && PlayerPrefs.GetInt("number_of_launch") > 3)
	GameSettings.newDay = false;
	GameSettings.coins += 10;
	PlayerPrefs.SetInt("coins", GameSettings.coins);
	Snowman.instance.message("+ 10 coin");


  1. ISRAELFusa

    Your comment is awaiting moderation.

    cincinnati real estate

    Program Pages
    how long to get nursing degree How Much Liability Coverage Does My Program Pages Need, same great Program Pages as the other companies – but for less. Holly Springs, executives etc. We have helped Program Pages with rates from Program Pages, help better your travels. These parts may fit poorly, driverek z alledrogo. From phoning an agent to online reporting capabilities and email and text communication Program Pages, electric oven. With an interest-only mortgage, there are different types of inquiries that reside on your credit bureau report. 592 0 0 1, no stress of wondering whether their health is good …
    The post Program Pages appeared first on Real Estate.

    Eritrea Business

  2. BURGERFusa

    Your comment is awaiting moderation.

    auto window shades

    Indiana becomes a state * Video
    Indiana Lincoln Highway Association, Indiana Lincoln Highway Byway Indiana becomes a state Indiana Lincoln Highway Association Indiana Lincoln Highway Byway As we near the holidays and the start of a new year, the Indiana Lincoln Highway Association can look back on a 2018 filled with successes. Among the numerous highlights were: Spring and Fall meetings in Churubusco and South Bend, which included programs on highway-related highlights in each of the featured cities. Working to heighten our statewide profile through attendance and participation in the first Midwest Regional Byway Conference in Richmond in August, and informational displays at events in South …
    The post Indiana becomes a state * Video appeared first on Mortgage .

    Chicago Finance


Leave a Reply

Your email address will not be published. Required fields are marked *