Ejemplo n.º 1
0
    public void UpdateCalendar()
    {
        if (ThisDay == GameSettings.MonthDays[(int)ThisMonth])    //if it is the end of the month
        {
            ThisDay = 1;
            if ((int)ThisMonth == 11)
            {
                ThisMonth = (GameSettings.Month) 0;
                ThisYear++;
            }
            else
            {
                ThisMonth = (GameSettings.Month)((int)ThisMonth + 1);
            }
        }
        else
        {
            ThisDay++;
        }

        MUI.NewNightDate.text = ThisMonth.ToString() + ". " + ThisDay + GameSettings.GetPlaceSuffix(ThisDay);
    }
Ejemplo n.º 2
0
    void StartGame()
    {
        M   = GameObject.FindWithTag("Map").GetComponent <Map>();
        Bus = GameObject.FindWithTag("Player").GetComponent <PlayerController>();
        Bus.SetFrozen(true);

        AllStops.Clear();
        foreach (Transform child in M.BusStops)
        {
            AllStops.Add(child.GetComponent <BusStop>());
        }

        ThisMonth = (GameSettings.Month)Random.Range(0, GameSettings.Month.GetNames(typeof(GameSettings.Month)).Length);
        ThisDay   = Random.Range(1, GameSettings.MonthDays[(int)ThisMonth] + 1);
        UpdateCalendar();

        MUI.Initialize();

        //PlayAmbient();

        StartCoroutine(M.Load());
    }