Example #1
0
    // Update is called once per frame
    void Update()
    {
        day   = days[dayNum];
        month = months[monthNum];



        clockTimer += Time.deltaTime * timeSpeed;
        int seconds = (int)(clockTimer % 60);
        int minutes = (int)(clockTimer / 60) % 60;
        int hours   = (int)(clockTimer / 3600) % 24;

        string CurrentTimeString = string.Format("{0:0}:{1:00}", hours, minutes);

        currentDateText.text = month + ", " + day + ", " + CurrentTimeString;


        //changes day, week and month with NextDay(), NextWeek(), NextMonth()
        if (hours == 23 && minutes == 59 && seconds == 59 && AllowNextDayBool == true)
        {
            NextDay();
            AllowNextDayBool = false;
            eventBool        = false;
        }

        //reset
        if (hours == 0 && minutes == 1 && seconds == 1)
        {
            AllowNextDayBool = true;
            eventBool        = true;
        }

        //reset event text
        if (hours == 0 && minutes == 9 && seconds == 59)
        {
            eventText.text = " ";
        }
        //events
        if (dayNum == 3 && weekNum == 3 && eventBool == true)
        {
            eventBool = false;
            moneyScript.StudieFin();
            differentText = 1;
            DisplayTextMessage();
        }
        if (dayNum == 2 && weekNum == 4 && eventBool == true)
        {
            eventBool = false;
            moneyScript.Loon();
            differentText = 2;
            DisplayTextMessage();
        }
        if (dayNum == 0 && weekNum == 3 && eventBool == true)
        {
            eventBool = false;
            moneyScript.Belastingsdients();
            differentText = 3;
            DisplayTextMessage();
        }
        if (dayNum == 5 && weekNum == 2 && eventBool == true)
        {
            eventBool = false;
            moneyScript.StudieBetalen();
            differentText = 4;
            DisplayTextMessage();
        }
        if (dayNum == 1 && weekNum == 3 && eventBool == true)
        {
            eventBool = false;
            moneyScript.Zorgtoeslag();
            differentText = 5;
            DisplayTextMessage();
        }
        if (dayNum == 4 && weekNum == 2 && eventBool == true)
        {
            eventBool = false;
            moneyScript.HuisHuur();
            differentText = 6;
            DisplayTextMessage();
        }

        if (dayNum == 6 && weekNum == 2 && eventBool == true)
        {
            eventBool = false;
            Debug.Log("Je bent nu halverwegen de eerste maand, Hoeveel geld denk je op het moment nog te hebben?");
        }
    }