//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void HandleDeselected(ISelectableItem pItem) { // sp.Write("0"); print("Mimic Deselected"); ISelectorItem OtherItemBehavior = (ISelectorItem)OtherItem.GetItem(); OtherItemBehavior.IsEnabled = true; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void HandleValueChanged(ISelectableItem <bool> pItem) { if (!pItem.Value) { return; } ISliderItem hue = (ISliderItem)HueSlider.GetItem(); hue.IsEnabled = (Mode == DemoEnvironment.ColorMode.Custom); Enviro.SetColorMode(Mode, hue.RangeValue); }
// Update is called once per frame void Update() { IStickyItem TrainItemBehavior = (IStickyItem)TrainItem.GetItem(); IStickyItem StopItemBehavior = (IStickyItem)StopItem.GetItem(); IStickyItem ExecuteItemBehavior = (IStickyItem)ExecuteItem.GetItem(); if (TrainingCompletedFlag == 1 && TrainFlag == 0 && ExecuteFlag == 0) { ExecuteItemBehavior.IsEnabled = true; } if (TrainingCompletedFlag == 0 || TrainFlag == 1 || ExecuteFlag == 1) { ExecuteItemBehavior.IsEnabled = false; } if (TrainFlag == 1 || ExecuteFlag == 1) { StopItemBehavior.IsEnabled = true; } if (TrainFlag == 0 && ExecuteFlag == 0) { StopItemBehavior.IsEnabled = false; } if (TrainFlag == 1 || ExecuteFlag == 1) { TrainItemBehavior.IsEnabled = false; } if (ExecuteFlag == 0 && TrainFlag == 0) { TrainItemBehavior.IsEnabled = true; } if (StopFlag == 1 && TrainFlag == 1) { StopFlag = 0; TrainFlag = 0; } if (StopFlag == 1 && ExecuteFlag == 1) { StopFlag = 0; ExecuteFlag = 0; } }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public void Awake() { vHoverHierarchy = gameObject.AddComponent <HovercastItemHierarchy>(); vHoverHierarchy.Title = "Hovercast VR"; vHoverItems = new HovercastItem[4]; for (int i = 0; i < vHoverItems.Length; ++i) { var itemObj = new GameObject("Item " + i); itemObj.transform.SetParent(gameObject.transform, false); HovercastItem hoverItem = itemObj.AddComponent <HovercastItem>(); hoverItem.Label = "Item " + i; hoverItem.Type = HovercastItem.HovercastItemType.Radio; hoverItem.RadioValue = (i == 0); vHoverItems[i] = hoverItem; IRadioItem radioItem = (IRadioItem)hoverItem.GetItem(); radioItem.OnSelected += HandleRadioItemSelected; } }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void HandleValueChanged(ISelectableItem <bool> pItem) { ItemToHide.GetItem().IsVisible = !pItem.Value; }