コード例 #1
0
    /*
     * void RegisterNewObject(GameObject Prefab)
     * {
     *  ClientScene.RegisterPrefab(Prefab);
     * }*/

    void TickForward()
    {
        if (CurrentTime.Minutes < 59)
        {
            CurrentTime.Minutes++;
        }
        else
        {
            CurrentTime.Hours++;
            CurrentTime.Minutes = 0;
        }

        if (CurrentTime.Hours >= BedTime.Hours && CurrentTime.Minutes >= BedTime.Minutes)
        {
            GameObject.FindWithTag("Player").GetComponent <Player>().Passout();
        }

        if (WillRain)
        {
            DNC.SetRain(DNC.TimeAlpha);
        }
        else
        {
            DNC.SetRain(0f);
        }

        DNC.DayNightUpdate();
    }