|
Serious Game - Electrónica VR 1.0.0
|
Multímetro digital VR para el Explorador. More...


Public Member Functions | |
| void | SetRedNode (ElectricalNode node) |
| Asigna el nodo a la punta roja (mano derecha). | |
| void | SetBlackNode (ElectricalNode node) |
| Asigna el nodo a la punta negra (mano izquierda). | |
| void | SetProbeA (ElectricalNode node) |
| Alias de SetProbeA → SetRedNode (usado por PlayerInteraction). | |
| void | SetProbeB (ElectricalNode node) |
| Alias de SetProbeB → SetBlackNode (usado por PlayerInteraction). | |
| void | ResetProbes () |
| void | SetMode (MultimeterMode newMode) |
| Cambia el modo de medición. | |
Public Attributes | |
| TMP_Text | txtVoltage |
| TMP_Text | txtCurrent |
| TMP_Text | txtStatus |
| TMP_Text | txtMode |
| Renderer | indicatorRed |
| Renderer | indicatorBlack |
| MultimeterMode | mode = MultimeterMode.DCVoltage |
| float | hapticIntensity = 0.3f |
| float | hapticDuration = 0.08f |
Properties | |
| float | measuredVoltage [get] |
| float | measuredCurrent [get] |
| bool | isReading [get] |
| ElectricalNode | probeA [get] |
| Reinicia ambas puntas (llamado por GameManager al cargar nivel). | |
| ElectricalNode | probeB [get] |
| Alias de probeB → _nodeBlack (compatibilidad con código existente). | |
Private Member Functions | |
| void | Awake () |
| void | Update () |
| void | TakeReading () |
| void | UpdateDisplay () |
| void | OnGrabbed (SelectEnterEventArgs args) |
| void | OnReleased (SelectExitEventArgs args) |
| void | SendHaptic () |
| void | SetIndicator (Renderer r, bool assigned) |
| string | ModeLabel () |
Static Private Member Functions | |
| static string | FormatVoltage (float v) |
| static string | FormatCurrent (float i) |
| static string | FormatResistance (float r) |
| static void | Set (TMP_Text t, string s) |
Private Attributes | |
| float | _measuredVoltage |
| float | _measuredCurrent |
| bool | _isReading |
| ElectricalNode | _nodeRed |
| ElectricalNode | _nodeBlack |
| XRGrabInteractable | _grab |
| UnityEngine.XR.Interaction.Toolkit.Interactors.IXRSelectInteractor | _currentInteractor |
Static Private Attributes | |
| static readonly Color | _colorAssigned = new Color(0.2f, 0.85f, 0.3f) |
| static readonly Color | _colorIdle = new Color(0.4f, 0.4f, 0.4f) |
Multímetro digital VR para el Explorador.
FLUJO:
JERARQUÍA EN UNITY: Multimeter_VR ← este script + XRGrabInteractable + Rigidbody ├─ Body ← Cube (0.06 × 0.12 × 0.02), color gris oscuro ├─ Indicator_Red ← Sphere (0.008), color rojo — se ilumina al asignar ├─ Indicator_Black ← Sphere (0.008), color negro — se ilumina al asignar └─ Screen_Canvas ← Canvas WorldSpace, Scale 0.001 ├─ TMP_Voltage ← "9.00 V" ├─ TMP_Current ← "15.3 mA" ├─ TMP_Status ← "MIDIENDO" / "SIN CONTACTO" └─ TMP_Mode ← "DC VOLTAGE"
NO necesita MultimeterProbe.cs ni CircuitNode.cs. Trabaja directamente con ElectricalNode asignado por NodeInteractable.
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
| void Multimeter.ResetProbes | ( | ) |
|
private |
|
staticprivate |
| void Multimeter.SetBlackNode | ( | ElectricalNode | node | ) |
Asigna el nodo a la punta negra (mano izquierda).
|
private |
| void Multimeter.SetMode | ( | MultimeterMode | newMode | ) |
Cambia el modo de medición.
| void Multimeter.SetProbeA | ( | ElectricalNode | node | ) |
Alias de SetProbeA → SetRedNode (usado por PlayerInteraction).
| void Multimeter.SetProbeB | ( | ElectricalNode | node | ) |
Alias de SetProbeB → SetBlackNode (usado por PlayerInteraction).
| void Multimeter.SetRedNode | ( | ElectricalNode | node | ) |
Asigna el nodo a la punta roja (mano derecha).
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| float Multimeter.hapticDuration = 0.08f |
| float Multimeter.hapticIntensity = 0.3f |
| Renderer Multimeter.indicatorBlack |
| Renderer Multimeter.indicatorRed |
| MultimeterMode Multimeter.mode = MultimeterMode.DCVoltage |
| TMP_Text Multimeter.txtCurrent |
| TMP_Text Multimeter.txtMode |
| TMP_Text Multimeter.txtStatus |
| TMP_Text Multimeter.txtVoltage |
|
get |
|
get |
|
get |
|
get |
Reinicia ambas puntas (llamado por GameManager al cargar nivel).
Alias de probeA → _nodeRed (compatibilidad con código existente).
|
get |
Alias de probeB → _nodeBlack (compatibilidad con código existente).