Serious Game - Electrónica VR 1.0.0
Loading...
Searching...
No Matches
SelectableComponent Class Reference

Versión VR de SelectableComponent. Reemplaza OnMouseDown() con XRSimpleInteractable para funcionar con los controladores del Meta Quest. More...

Inheritance diagram for SelectableComponent:
Inheritance graph
Collaboration diagram for SelectableComponent:
Collaboration graph

Public Member Functions

void Highlight ()
void ResetHighlight ()

Public Attributes

ElectricalComponent component
TechnicianActions technicianActions
PlayerInteraction playerInteraction
Color hoverColor = new Color(1f, 1f, 0f, 0.5f)
Color selectedColor = Color.yellow

Private Member Functions

void Awake ()
void OnEnable ()
void OnDisable ()
void OnHoverEnter (HoverEnterEventArgs args)
void OnHoverExit (HoverExitEventArgs args)
void OnSelect (SelectEnterEventArgs args)
void SetColor (Color c)

Private Attributes

UnityEngine.XR.Interaction.Toolkit.Interactables.XRBaseInteractable _interactable
Renderer _renderer
Color _originalColor
MaterialPropertyBlock _mpb

Static Private Attributes

static readonly int _colorID = Shader.PropertyToID("_Color")

Detailed Description

Versión VR de SelectableComponent. Reemplaza OnMouseDown() con XRSimpleInteractable para funcionar con los controladores del Meta Quest.

SETUP:

  1. Agregar XRSimpleInteractable (o XRGrabInteractable si el componente se puede agarrar)
  2. Asignar el ElectricalComponent en component
  3. Asignar TechnicianActions desde el inspector

Member Function Documentation

◆ Awake()

void SelectableComponent.Awake ( )
private

◆ Highlight()

void SelectableComponent.Highlight ( )

◆ OnDisable()

void SelectableComponent.OnDisable ( )
private

◆ OnEnable()

void SelectableComponent.OnEnable ( )
private

◆ OnHoverEnter()

void SelectableComponent.OnHoverEnter ( HoverEnterEventArgs args)
private

◆ OnHoverExit()

void SelectableComponent.OnHoverExit ( HoverExitEventArgs args)
private

◆ OnSelect()

void SelectableComponent.OnSelect ( SelectEnterEventArgs args)
private

◆ ResetHighlight()

void SelectableComponent.ResetHighlight ( )

◆ SetColor()

void SelectableComponent.SetColor ( Color c)
private

Member Data Documentation

◆ _colorID

readonly int SelectableComponent._colorID = Shader.PropertyToID("_Color")
staticprivate

◆ _interactable

UnityEngine.XR.Interaction.Toolkit.Interactables.XRBaseInteractable SelectableComponent._interactable
private

◆ _mpb

MaterialPropertyBlock SelectableComponent._mpb
private

◆ _originalColor

Color SelectableComponent._originalColor
private

◆ _renderer

Renderer SelectableComponent._renderer
private

◆ component

ElectricalComponent SelectableComponent.component

◆ hoverColor

Color SelectableComponent.hoverColor = new Color(1f, 1f, 0f, 0.5f)

◆ playerInteraction

PlayerInteraction SelectableComponent.playerInteraction

◆ selectedColor

Color SelectableComponent.selectedColor = Color.yellow

◆ technicianActions

TechnicianActions SelectableComponent.technicianActions

The documentation for this class was generated from the following file: