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

Nodo eléctrico seleccionable por VR. El Explorador apunta con el controlador y presiona el gatillo para colocar la punta del multímetro. More...

Inheritance diagram for NodeInteractable:
Inheritance graph
Collaboration diagram for NodeInteractable:
Collaboration graph

Public Attributes

ElectricalNode nodeTarget
ProbeType probeType = ProbeType.Auto
Multimeter multimeter
Renderer nodeRenderer
Color hoverColor = Color.yellow
Color selectedColor = Color.cyan

Private Member Functions

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

Static Private Member Functions

static bool IsRightHand (UnityEngine.XR.Interaction.Toolkit.Interactors.IXRInteractor interactor)

Private Attributes

UnityEngine.XR.Interaction.Toolkit.Interactables.XRSimpleInteractable _interactable
Color _originalColor
MaterialPropertyBlock _mpb

Static Private Attributes

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

Detailed Description

Nodo eléctrico seleccionable por VR. El Explorador apunta con el controlador y presiona el gatillo para colocar la punta del multímetro.

CAMBIO respecto a la versión anterior:

SETUP (sin cambios respecto a lo que ya tienes):

  1. XRSimpleInteractable en este GameObject
  2. Collider (isTrigger = FALSE) para el ray-cast
  3. Asignar nodeTarget (ElectricalNode con voltage y current)
  4. Asignar multimeter desde el inspector o auto-find

Member Function Documentation

◆ Awake()

void NodeInteractable.Awake ( )
private

◆ IsRightHand()

bool NodeInteractable.IsRightHand ( UnityEngine.XR.Interaction.Toolkit.Interactors.IXRInteractor interactor)
staticprivate

◆ OnDisable()

void NodeInteractable.OnDisable ( )
private

◆ OnEnable()

void NodeInteractable.OnEnable ( )
private

◆ OnHoverEnter()

void NodeInteractable.OnHoverEnter ( HoverEnterEventArgs args)
private

◆ OnHoverExit()

void NodeInteractable.OnHoverExit ( HoverExitEventArgs args)
private

◆ OnSelectEnter()

void NodeInteractable.OnSelectEnter ( SelectEnterEventArgs args)
private

◆ ResetColor()

void NodeInteractable.ResetColor ( )
private

◆ SetColor()

void NodeInteractable.SetColor ( Color c)
private

Member Data Documentation

◆ _colorID

readonly int NodeInteractable._colorID = Shader.PropertyToID("_BaseColor")
staticprivate

◆ _interactable

UnityEngine.XR.Interaction.Toolkit.Interactables.XRSimpleInteractable NodeInteractable._interactable
private

◆ _mpb

MaterialPropertyBlock NodeInteractable._mpb
private

◆ _originalColor

Color NodeInteractable._originalColor
private

◆ hoverColor

Color NodeInteractable.hoverColor = Color.yellow

◆ multimeter

Multimeter NodeInteractable.multimeter

◆ nodeRenderer

Renderer NodeInteractable.nodeRenderer

◆ nodeTarget

ElectricalNode NodeInteractable.nodeTarget

◆ probeType

ProbeType NodeInteractable.probeType = ProbeType.Auto

◆ selectedColor

Color NodeInteractable.selectedColor = Color.cyan

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