private void Start() { if (Camera.main == null) { Debug.LogError(" GazeSelection:No main camera exists in the scene, unable to use GazeSelection.", this); GameObject.Destroy(this); return; } if (Cursor.Instance == null) { Debug.LogError("GazeSelection: no target layer masks can be used because the Cursor was not found.", this); GameObject.Destroy(this); return; } if (TransitionManager.Instance == null) { Debug.LogWarning("GazeSelection: No TransitionManager found, so input is not disabled during transitions."); } else if (TransitionManager.Instance.ViewVolume != null) { placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); } selectedTargets = new SortedList <float, RaycastHit>(); targetSpreadMinValue = Mathf.Cos(Mathf.Deg2Rad * GazeSpreadDegrees); if (!UnityEngine.VR.VRDevice.isPresent) { UseSphericalConeSearch = false; } }
public void OnTapped(InteractionSourceKind source, int tapCount, Ray ray) { if (TransitionManager.Instance != null && !TransitionManager.Instance.InTransition) { bool handled = false; if (GazeSelectionManager.Instance && GazeSelectionManager.Instance.SelectedTarget) { handled = GazeSelectionManager.Instance.SelectedTarget.OnTapped(source, tapCount, ray); } else { PlacementControl placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); if (placementControl != null && placementControl.IsHolding) { handled = placementControl.OnTapped(source, tapCount, ray); if (ToolSounds.Instance) { ToolSounds.Instance.PlaySelectSound(); } } } if (!handled && InputTapped != null) { InputTapped(source, tapCount, ray); } if (Tapped != null) { Tapped(source, tapCount, ray); } } }
private void Start() { cubeToMove = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); if (TooltipObject != null) { TooltipObject.SetActive(false); } }
private void Start() { placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); if (placementControl != null) { placementControl.ContentHeld += PlacementControl_ContentHeld; placementControl.ContentPlaced += PlacementControl_ContentPlaced; } if (TransitionManager.Instance != null) { TransitionManager.Instance.ResetStarted += ResetStarted; } }
private void CoreSystemsLoaded() { ViewLoader.Instance.CoreSystemsLoaded -= CoreSystemsLoaded; InputRouter.Instance.InputTapped += OnTapped; coreSystemsLoaded = true; placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); MusicManager.Instance.FindSnapshotAndTransition(MusicManager.Instance.Welcome); VOManager.Instance.Stop(clearQueue: true); VOManager.Instance.PlayClip(Title); VOManager.Instance.PlayClip(Description); VOManager.Instance.PlayClip(Goal); VOManager.Instance.PlayClip(Invitation); UpdateInstructions(); }
private void CoreSystemsLoaded() { ViewLoader.Instance.CoreSystemsLoaded -= CoreSystemsLoaded; InputRouter.Instance.InputTapped += OnTapped; coreSystemsLoaded = true; placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren <PlacementControl>(); MusicManager.Instance.FindSnapshotAndTransition(MusicManager.Instance.Welcome); VOManager.Instance.Stop(clearQueue: true); VOManager.Instance.PlayClip(Title); //VOManager.Instance.PlayClip(Description); //VOManager.Instance.PlayClip(Goal); //VOManager.Instance.PlayClip(Invitation); //UpdateInstructions(); //"Ahmed": Added instead of UpdateInstructions method to go directly to the logo without setting the instructionSlate script AdvanceIntroduction(); }
private void Start() { if (Camera.main == null) { Debug.LogError(" GazeSelection:No main camera exists in the scene, unable to use GazeSelection.", this); GameObject.Destroy(this); return; } if (Cursor.Instance == null) { Debug.LogError("GazeSelection: no target layer masks can be used because the Cursor was not found.", this); GameObject.Destroy(this); return; } if (TransitionManager.Instance == null) { Debug.LogWarning("GazeSelection: No TransitionManager found, so input is not disabled during transitions."); } else if (TransitionManager.Instance.ViewVolume != null) { placementControl = TransitionManager.Instance.ViewVolume.GetComponentInChildren<PlacementControl>(); } selectedTargets = new SortedList<float, RaycastHit>(); targetSpreadMinValue = Mathf.Cos(Mathf.Deg2Rad * GazeSpreadDegrees); }
private void Start() { cubeToMove = TransitionManager.Instance.ViewVolume.GetComponentInChildren<PlacementControl>(); if (TooltipObject != null) { TooltipObject.SetActive(false); } }