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; }
public bool CollectPressDown(HandSide hand) { return(CollectButton.GetStateDown(hand == HandSide.Left ? SteamVR_Input_Sources.LeftHand : SteamVR_Input_Sources.RightHand)); }