Esempio n. 1
0
    void EndGame()
    {
        // Initialize and shut down
        GameInterfaces gi = FindObjectOfType <GameInterfaces>();

        if (gi != null)
        {
            gi.StopGameInterfaces();
            gi.gameObject.SetActive(false);
        }
        cursorManagement.KillGameCursor();
        temporality.SetTimeOfDay(20);
        temporality.SetTimeScale(2);

        roamerManager.End();

        // Clear events
        eventManager.ClearListeners();
        cursorManagement.ClearListeners();
        achievementManager.ClearListeners();

        // Clear system
        systemManager.ClearSystem();

        // Remove gameevents and citizens
        populationManager.Clear();
        eventManager.ResetChances();

        // Shut down only
        displayerManager.UnstageAll();

        // Ingame switch
        inGame = false;
    }