/// <summary>
 /// Register the interactor when the game object is enabled.
 /// </summary>
 protected virtual void OnEnable()
 {
     var interactor = new EyeXInteractor(_interactorId, EyeXHost.NoParent);
     interactor.EyeXBehaviors = GetEyeXBehaviorsForGameObjectInteractor();
     UpdateInteractorLocation(interactor);
     _eyeXHost.RegisterInteractor(interactor);
 }
Exemple #2
0
    public void OnEnable()
    {
        // Register activatable interactors for the GUI buttons when the game object is enabled.
        var spinInteractor = new EyeXInteractor(SpinButtonId, EyeXHost.NoParent);

        spinInteractor.EyeXBehaviors.Add(new EyeXActivatable(_eyeXHost.ActivationHub)
        {
            IsTentativeFocusEnabled = false
        });
        spinInteractor.Location = CreateLocation(SpinButtonBounds);
        _eyeXHost.RegisterInteractor(spinInteractor);

        var stopInteractor = new EyeXInteractor(StopButtonId, EyeXHost.NoParent);

        stopInteractor.EyeXBehaviors.Add(new EyeXActivatable(_eyeXHost.ActivationHub)
        {
            IsTentativeFocusEnabled = false
        });
        stopInteractor.Location = CreateLocation(StopButtonBounds);
        _eyeXHost.RegisterInteractor(stopInteractor);
    }
Exemple #3
0
 /// <summary>
 /// Register an activatable interactor for each menu item when the game object is enabled.
 /// </summary>
 public void OnEnable()
 {
     foreach (var menuItem in _menuItems)
     {
         var interactorId = menuItem.name;
         var interactor   = new EyeXInteractor(interactorId, EyeXHost.NoParent);
         interactor.EyeXBehaviors.Add(new EyeXActivatable(_eyeXHost.ActivationHub)
         {
             IsTentativeFocusEnabled = true
         });
         interactor.Location = CreateLocation(menuItem, _gameMenu.IsVisible);
         _eyeXHost.RegisterInteractor(interactor);
     }
 }