예제 #1
0
		private void Awake ()
		{
			GetSettingsManager ();
			LayerOn = LayerMask.NameToLayer (settingsManager.hotspotLayer);
			LayerOff = LayerMask.NameToLayer (settingsManager.deactivatedLayer);

			navigationManager = GameObject.FindWithTag (Tags.gameEngine).GetComponent <NavigationManager>();

			_Awake ();
		}
예제 #2
0
		private void Awake ()
		{
			if (AdvGame.GetReferences () && AdvGame.GetReferences ().settingsManager)
			{
				settingsManager = AdvGame.GetReferences ().settingsManager;
			}
			
			playerInput = this.GetComponent <PlayerInput>();
			playerInteraction = this.GetComponent <PlayerInteraction>();
			playerCursor = this.GetComponent <PlayerCursor>();
			sceneSettings = this.GetComponent <SceneSettings>();
			navigationManager = this.GetComponent <NavigationManager>();
		}
예제 #3
0
		private void OnDestroy ()
		{
			firstPersonCamera = null;
			playerInput = null;
			settingsManager = null;
			sceneSettings = null;
			playerMenus = null;
			navigationManager = null;
		}
예제 #4
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 ();
        }