Exemplo n.º 1
0
        public static void SetGameEngine(GameObject _gameEngine = null)
        {
            if (_gameEngine != null)
            {
                gameEnginePrefab = _gameEngine;

                menuSystemComponent        = null;
                playerCursorComponent      = null;
                playerInputComponent       = null;
                playerInteractionComponent = null;
                playerMovementComponent    = null;
                playerMenusComponent       = null;
                playerQTEComponent         = null;
                kickStarterComponent       = null;
                sceneSettingsComponent     = null;
                dialogComponent            = null;
                menuPreviewComponent       = null;
                navigationManagerComponent = null;
                actionListManagerComponent = null;
                localVariablesComponent    = null;
                eventManagerComponent      = null;

                return;
            }

            if (gameEnginePrefab == null)
            {
                SceneSettings sceneSettings = UnityVersionHandler.GetKickStarterComponent <SceneSettings>();
                if (sceneSettings != null)
                {
                    gameEnginePrefab = sceneSettings.gameObject;
                }
            }
        }
Exemplo n.º 2
0
        /**
         * <summary>Unsets the values of all script variables, so that they can be re-assigned to the correct scene if multiple scenes are open.</summary>
         */
        public void ClearVariables()
        {
            playerPrefab           = null;
            mainCameraPrefab       = null;
            persistentEnginePrefab = null;
            gameEnginePrefab       = null;

            // Managers
            sceneManagerPrefab     = null;
            settingsManagerPrefab  = null;
            actionsManagerPrefab   = null;
            variablesManagerPrefab = null;
            inventoryManagerPrefab = null;
            speechManagerPrefab    = null;
            cursorManagerPrefab    = null;
            menuManagerPrefab      = null;

            // PersistentEngine components
            optionsComponent                = null;
            runtimeInventoryComponent       = null;
            runtimeVariablesComponent       = null;
            playerMenusComponent            = null;
            stateHandlerComponent           = null;
            sceneChangerComponent           = null;
            saveSystemComponent             = null;
            levelStorageComponent           = null;
            runtimeLanguagesComponent       = null;
            actionListAssetManagerComponent = null;

            // GameEngine components
            menuSystemComponent        = null;
            dialogComponent            = null;
            playerInputComponent       = null;
            playerInteractionComponent = null;
            playerMovementComponent    = null;
            playerCursorComponent      = null;
            playerQTEComponent         = null;
            sceneSettingsComponent     = null;
            navigationManagerComponent = null;
            actionListManagerComponent = null;
            localVariablesComponent    = null;
            menuPreviewComponent       = null;
            eventManagerComponent      = null;

            SetGameEngine();
        }
Exemplo n.º 3
0
        /**
         * <summary>Unsets the values of all script variables, so that they can be re-assigned to the correct scene if multiple scenes are open.</summary>
         */
        public void ClearVariables()
        {
            playerPrefab = null;
            mainCameraPrefab = null;
            persistentEnginePrefab = null;
            gameEnginePrefab = null;

            // Managers
            sceneManagerPrefab = null;
            settingsManagerPrefab = null;
            actionsManagerPrefab = null;
            variablesManagerPrefab = null;
            inventoryManagerPrefab = null;
            speechManagerPrefab = null;
            cursorManagerPrefab = null;
            menuManagerPrefab = null;

            // PersistentEngine components
            optionsComponent = null;
            runtimeInventoryComponent = null;
            runtimeVariablesComponent = null;
            playerMenusComponent = null;
            stateHandlerComponent = null;
            sceneChangerComponent = null;
            saveSystemComponent = null;
            levelStorageComponent = null;
            runtimeLanguagesComponent = null;

            // GameEngine components
            menuSystemComponent = null;
            dialogComponent = null;
            playerInputComponent = null;
            playerInteractionComponent = null;
            playerMovementComponent = null;
            playerCursorComponent = null;
            playerQTEComponent = null;
            sceneSettingsComponent = null;
            navigationManagerComponent = null;
            actionListManagerComponent = null;
            localVariablesComponent = null;
            menuPreviewComponent = null;

            SetGameEngine ();
        }