/// <summary> /// Handles the tap to continue selected event. /// </summary> public void OnTapToContinueSelected() { // turning on either stereo setup FTUE or non FTUE if (FtueDataController.IsFtueComplete(FtueType.Setup)) { // showing non ftue screen NonFtueSetup.gameObject.SetActive(true); NonFtueSetup.GetComponent <Animator>().Play(StereoSetupController.EnterAnimationClip); // hiding ftue screen FtueSetup.gameObject.SetActive(false); } else { // hiding non ftue screen NonFtueSetup.gameObject.SetActive(false); // showing ftue screen FtueSetup.gameObject.SetActive(true); FtueSetup.GetComponent <Animator>().Play(StereoSetupController.EnterAnimationClip); } // playing sound AudioEvent.Play(AudioEventName.Ftue.Stereo.MenuStart, gameObject); }
/// <summary> /// Raises the enter headset mode event. /// </summary> public void OnEnterHeadsetMode() { KpiTracking.TrackSceneLoadTime(); // TODO: mathh010 remove once enter headset mode button is removed // updating ftue data if (IssueController.TotalIssues > 0) { // checking for issues IssueController.gameObject.SetActive(true); } else { // playing sound AudioEvent.Play(AudioEventName.Ftue.Stereo.CheckLaunch, gameObject); if (!FtueDataController.IsFtueComplete(FtueType.Setup)) { FtueDataController.SetFtueComplete(FtueType.Setup); } // launching the appropriate game scene SetupController.LoadScene(); } }
private int GetNumberOfIssues() { // calculating number of issues int totalIssues = 0; totalIssues += IsPhoneBatteryLow ? 1 : 0; totalIssues += IsSaberBatteryLow ? 1 : 0; totalIssues += IsSoundMuted ? 1 : 0; totalIssues += (!SetupController.IsPeripheralCalibrated && !FtueDataController.IsFtueComplete(FtueType.Setup)) ? 1 : 0; totalIssues += !SetupController.IsControllerConnected ? 1 : 0; return(totalIssues); }
protected void OnHmdConnected() { // updating ftue data if (!FtueDataController.IsFtueComplete(FtueType.Setup)) { FtueDataController.SetFtueComplete(FtueType.Setup); } // launching the game if (!AndroidPopup.activeSelf) { SetupController.LoadScene(); } }
protected void OnSdkReady() { // no further initialization needed if FTUE is complete if (FtueDataController.IsFtueComplete(FtueType.Intro)) { return; } // adding controller saberPeripheral = new ControllerPeripheral(VisionSDK.ControllerName, ControllerTransform, null, container.GetSavedSaberColorID()); Sdk.Connections.AddPeripheral(saberPeripheral); // adding beacon Sdk.Tracking.OnBeaconStateChange += OnBeaconStateChange; // checking beacon signal if (Sdk.Tracking.IsBeaconTracked) { beaconSeen = true; // playing audio - signal acquired AudioEvent.Play(AudioEventName.Ftue.Computer.SignalAcquired, gameObject); } else { // playing audio - searching for signal AudioEvent.Play(AudioEventName.Ftue.Computer.AcquireSignal, gameObject); } // setting input handler Sdk.Input.OnButtonDown += OnButtonDown; // adding input listeners Sdk.Connections.OnPeripheralStateChange += OnPeripheralConnected; Sdk.Connections.OnPeripheralStateChange += OnPeripheralDisconnected; // adding animation listener HolocronAnimations.OnAnimationComplete += OnHolocronEnterAnimationComplete; // loading animation sequence config StreamingAssetsStorage loader = new StreamingAssetsStorage(Game.ForceVision, null); loader.LoadStreamingAssetsText(AnimationConfigFile, OnConfigLoaded, true); // playing sound AudioEvent.Play(AudioEventName.Ftue.MusicStart, gameObject); }
protected void Start() { if (!FtueDataController.IsFtueComplete(FtueType.Intro)) { AkBankManager.LoadBank("Container_DX_SB", false, false); } // setup the SDK Sdk.SetLogger(new Disney.ForceVision.Internal.VisionSdkLoggerProxy()); Sdk.Heartbeat.OnFrameUpdate += OnSdkFrameUpdate; Sdk.StereoCamera.UseMagnetometerCorrection = false; Invoke("OnSdkReady", 0.1f); }
protected void OnSdkReady() { // no further initialization needed if FTUE is complete if (FtueDataController.IsFtueComplete(FtueType.DarkSide)) { return; } // adding controller saberPeripheral = new ControllerPeripheral( VisionSDK.ControllerName, ControllerTransform, null, container.GetSavedSaberColorID() ); Sdk.Connections.AddPeripheral(saberPeripheral); // adding beacon Sdk.Tracking.OnBeaconStateChange += OnBeaconStateChange; // checking beacon signal if (Sdk.Tracking.IsBeaconTracked) { beaconSeen = true; } else { } // setting input handler Sdk.Input.OnButtonDown += OnButtonDown; // adding input listeners Sdk.Connections.OnPeripheralStateChange += OnPeripheralConnected; Sdk.Connections.OnPeripheralStateChange += OnPeripheralDisconnected; // loading animation sequence config StreamingAssetsStorage loader = new StreamingAssetsStorage(Game.ForceVision, null); loader.LoadStreamingAssetsText(AnimationConfigFile, OnConfigLoaded, true); // playing the menu FTUE animation Menu.GetComponent <Animator>().Play(MenuFtue); }
private void OnButtonDown(object sender, ButtonEventArgs eventArguments) { switch (currentState) { case PrepareHeadsetState.TrayInHeadset: currentState = PrepareHeadsetState.ConnectionFound; break; case PrepareHeadsetState.Controls: AudioEvent.Play(AudioEventName.Ftue.Stereo.CheckLaunch, gameObject); if (FtueDataController.IsFtueComplete(FtueType.Intro)) { LoadScene(container.PlayingDarkSide ? DarkSideGameScene : LightSideGameScene); } else { LoadScene(container.PlayingDarkSide ? DarkSideFtueScene : LightSideFtueScene); } break; } }
private void Update() { if (currentState > PrepareHeadsetState.TrayInHeadset && !Application.isEditor) { HMDConnectPopup.CheckConnection(); } switch (currentState) { case PrepareHeadsetState.NoConnection: if (!HMDConnectPopup.IsShowing()) { currentState = PrepareHeadsetState.ConnectionFound; } break; case PrepareHeadsetState.ConnectionFound: // if connection is found, either show the controls panel or go straight to main game if (FtueDataController.IsFtueComplete(FtueType.Intro)) { LoadScene(container.PlayingDarkSide ? DarkSideGameScene : LightSideGameScene); } else { currentState = PrepareHeadsetState.Controls; } break; default: if (HMDConnectPopup.IsShowing()) { currentState = PrepareHeadsetState.NoConnection; } break; } PreparePanel.SetActive(currentState == PrepareHeadsetState.TrayInHeadset); ControlsPrompt.SetActive(currentState == PrepareHeadsetState.Controls); }
protected void Awake() { // displaying close button only if the setup FTUE has been completed CloseButton.SetActive(FtueDataController.IsFtueComplete(FtueType.Setup)); }
private void UpdateView() { if (!Application.isEditor) { ContinueAnywayButton.SetActive(SetupController.IsControllerConnected); } LightSaberNotSynced.SetActive(!SetupController.IsControllerConnected); LightSaberNotCalibrated.SetActive(!SetupController.IsPeripheralCalibrated && !FtueDataController.IsFtueComplete(FtueType.Setup)); // only displaying saber battery warning when saber is synced if (!SetupController.IsControllerConnected) { LightSaberLowBattery.SetActive(false); } else { LightSaberLowBattery.SetActive(IsSaberBatteryLow); } PhoneLowBattery.SetActive(IsPhoneBatteryLow); SoundMuted.SetActive(IsSoundMuted); currentTotalIssues = GetNumberOfIssues(); // Handle UI and sounds based on when issues change while on this screen if (previousTotalIssues != currentTotalIssues && gameObject.activeSelf) { if (currentTotalIssues == 0) { Header.SetState(SwitchState.Off); ButtonTextSwitch.SetState(SwitchState.Off); AudioEvent.Play(AudioEventName.Ftue.Stereo.CheckLaunch, gameObject); } else { Header.SetState(SwitchState.On); ButtonTextSwitch.SetState(SwitchState.On); if (currentTotalIssues > previousTotalIssues) { AudioEvent.Play(AudioEventName.Ftue.Stereo.ConnectionNotFound, gameObject); } else { AudioEvent.Play(AudioEventName.Ftue.Stereo.MinusButton, gameObject); } } previousTotalIssues = currentTotalIssues; } }