Example #1
0
        public GeneratorViewComponent(Entity entity)
        {
            this.viewComp      = entity.Get <GameObjectViewComponent>();
            this.collectButton = new CollectButton(entity);
            UXController uXController = Service.UXController;

            this.textLabel         = uXController.MiscElementsManager.CreateCollectionLabel("GeneratorCollectLabel", uXController.WorldAnchor);
            this.textLabel.Visible = false;
            this.textTimerId       = 0u;
        }
 public override void OnRemove()
 {
     if (this.collectButton != null)
     {
         this.collectButton.Destroy();
         this.collectButton = null;
     }
     this.KillTextTimer();
     if (this.textLabel != null)
     {
         Service.Get <UXController>().MiscElementsManager.DestroyMiscElement(this.textLabel);
         this.textLabel = null;
     }
     this.tooltipHelper = null;
 }
Example #3
0
 public bool CollectPressDown(HandSide hand)
 {
     return(CollectButton.GetStateDown(hand == HandSide.Left ? SteamVR_Input_Sources.LeftHand : SteamVR_Input_Sources.RightHand));
 }