private void Awake () { GetSettingsManager (); LayerOn = LayerMask.NameToLayer (settingsManager.hotspotLayer); LayerOff = LayerMask.NameToLayer (settingsManager.deactivatedLayer); navigationManager = GameObject.FindWithTag (Tags.gameEngine).GetComponent <NavigationManager>(); _Awake (); }
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>(); }
private void OnDestroy () { firstPersonCamera = null; playerInput = null; settingsManager = null; sceneSettings = null; playerMenus = null; navigationManager = null; }
/** * <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 (); }