Beispiel #1
0
    void Update()
    {
        //Managing the time and the time UI
        timeManager.TimePass(Time.deltaTime);
        uiController.ChangeTimeText(timeManager.GenerateIngameTimeText());
        uiController.ChangePicto(timeManager.GetHour());

        //Managing pothole spawning
        if (potholeManager.TimeSinceLastPothole(timeManager.GetTimeSinceStart(), potholeSpawnTime) >= potholeSpawnTime)
        {
            potholeManager.SpawnPothole();
        }
    }