Esempio n. 1
0
    private void Awake()
    {
        /*
         * Save Handler loads sectors now
         */
        AllLoaded = false;
        Application.targetFrameRate = 60;

        if (resourceManager)
        {
            resourceManager.Initialize();
        }

        if (factionManager)
        {
            factionManager.Initialize();
        }

        if (audioManager)
        {
            audioManager.Initialize();
        }

        if (sectorManager)
        {
            sectorManager.Initialize();
        }

        // Save Handler will initialize dialogue canvases after sector loading if present.
        if (!saveHandler && dialogueSystem)
        {
            DialogueSystem.InitCanvases();
        }

        if (saveHandler)
        {
            saveHandler.Initialize();
        }

        // Save Handler will initialize mission canvases after sector loading if present.
        if (!saveHandler && taskManager)
        {
            taskManager.Initialize();
        }

        AllLoaded = true;
    }