public virtual void Setup(VisionSDK sdk, GazeWatcher gazeWatcher, Game game, MainNavigationController controller) { Sdk = sdk; GazeWatcher = gazeWatcher; Game = game; Controller = controller; GazeListener = new GazeListener(new [] { typeof(NavigationElement) }, OnGazedAt, OnGazedOff); GazeWatcher.AddListener(GazeListener); }
private void Start() { gazeListener = new GazeListener(new [] { typeof(MenuNode), typeof(ReferenceNode), typeof(CurvedUIButton) }, OnItemGazedAt, OnItemGazedOff); GazeWatcher.AddListener(gazeListener); GazeWatcher.RaycastEnabled = true; lastNode = selectedNode = Galaxy.GetComponent <MenuNode>(); SceneManager.sceneLoaded += OnSceneLoadedDoPillarSetup; SceneManager.LoadScene("Pillars", LoadSceneMode.Additive); if (DeepLinkOnLoad) { deepLinkDifficulty = DifficultyToLoad; } }
private void Start() { // Our Container API container = new ContainerAPI(Game.ForceVision); container.NativeBridge.OnLowMemory += OnLowMemory; if (MenuController.ConfigToLoad != null) { DuelistTitle.text = Localizer.Get("PedestalView.Title.LevelName." + MenuController.ConfigToLoad.GetTokenString()).Replace(Environment.NewLine, " "); // Medium on Core is called Easy. Otherwise, assign difficulty like normal if (MenuController.ConfigToLoad.Planet == PlanetType.Core && MenuController.DifficultyToLoad == Difficulty.Medium) { DifficultyText.text = Localizer.Get("General.Name." + PlanetType.Core.ToString()) + ", " + Localizer.Get("LightsaberDuel.Difficulty.Easy"); } else if (MenuController.ConfigToLoad.IsBonusPlanet) { DifficultyText.text = Localizer.Get("General.Name." + MenuController.ConfigToLoad.BonusPlanet.ToString()) + ", " + Localizer.Get("LightsaberDuel.Difficulty." + MenuController.DifficultyToLoad.ToString()); } else { DifficultyText.text = Localizer.Get("General.Name." + MenuController.ConfigToLoad.Planet.ToString()) + ", " + Localizer.Get("LightsaberDuel.Difficulty." + MenuController.DifficultyToLoad.ToString()); } PromptText.text = MenuController.ConfigToLoad.Game == Game.Assault ? Localizer.Get("LightsaberDuel.Prompt.SelectForcePower") : Localizer.Get("LightsaberDuel.Prompt.SelectForcePowers"); } // Setup the SDK Sdk.SetLogger(new VisionSdkLoggerProxy()); OnSDKReady(); Sdk.StereoCamera.UseMagnetometerCorrection = false; gazeListener = new GazeListener(new [] { typeof(BaseEquipItem) }, OnItemGazedAt, OnItemGazedOff); GazeWatcher.AddListener(gazeListener); }