private void GetReferences () { settingsManager = AdvGame.GetReferences ().settingsManager; if (settingsManager.IsInLoadingScene ()) { return; } speechManager = AdvGame.GetReferences ().speechManager; cursorManager = AdvGame.GetReferences ().cursorManager; menuManager = AdvGame.GetReferences ().menuManager; playerCursor = GameObject.FindWithTag (Tags.gameEngine).GetComponent <PlayerCursor>(); actionListManager = playerCursor.GetComponent <ActionListManager>(); playerInput = playerCursor.GetComponent <PlayerInput>(); playerInteraction = playerCursor.GetComponent <PlayerInteraction>(); menuSystem = playerCursor.GetComponent <MenuSystem>(); dialog = playerCursor.GetComponent <Dialog>(); sceneSettings = playerCursor.GetComponent <SceneSettings>(); stateHandler = this.GetComponent <StateHandler>(); options = this.GetComponent <Options>(); runtimeInventory = this.GetComponent <RuntimeInventory>(); }
private void GetReferences () { settingsManager = AdvGame.GetReferences ().settingsManager; if (settingsManager != null && settingsManager.IsInLoadingScene ()) { return; } playerCursor = GameObject.FindWithTag (Tags.gameEngine).GetComponent <PlayerCursor>(); playerInput = playerCursor.GetComponent <PlayerInput>(); playerInteraction = playerCursor.GetComponent <PlayerInteraction>(); playerMovement = playerCursor.GetComponent <PlayerMovement>(); dialog = playerCursor.GetComponent <Dialog>(); playerMenus = GetComponent <PlayerMenus>(); actionListManager = playerCursor.GetComponent <ActionListManager>(); dragBases = FindObjectsOfType (typeof (DragBase)) as DragBase[]; hotspots = FindObjectsOfType (typeof (Hotspot)) as Hotspot[]; arrowPrompts = FindObjectsOfType (typeof (ArrowPrompt)) as ArrowPrompt[]; parallax2Ds = FindObjectsOfType (typeof (Parallax2D)) as Parallax2D[]; }