|
Serious Game - Electrónica VR 1.0.0
|
Componente físico sobre la mesa del Técnico. PC: hover (mouse) + click → selecciona y coloca en la bandeja. VR: rayo del controlador → hover + gatillo → mismo resultado. More...


Public Member Functions | |
| void | SelectThisComponent () |
| void | Deselect () |
Public Attributes | |
| ComponentType | componentType = ComponentType.Resistor |
| float | componentValue = 100f |
| string | componentDescription = "100 Ω" |
| ComponentSendingTray | tray |
| Color | colorNormal = new Color(0.3f, 0.3f, 0.4f) |
| Color | colorHover = new Color(0.9f, 0.8f, 0.2f) |
| Color | colorSelected = new Color(0.2f, 0.8f, 0.4f) |
| float | emissionIntensity = 1.8f |
| float | selectedScaleMultiplier = 1.08f |
Private Member Functions | |
| void | Awake () |
| void | OnEnable () |
| void | OnDisable () |
| void | OnMouseEnter () |
| void | OnMouseExit () |
| void | OnMouseDown () |
| void IPointerClickHandler. | OnPointerClick (PointerEventData e) |
| void IPointerEnterHandler. | OnPointerEnter (PointerEventData e) |
| void IPointerExitHandler. | OnPointerExit (PointerEventData e) |
| void | OnXRHoverEnter (HoverEnterEventArgs args) |
| void | OnXRHoverExit (HoverExitEventArgs args) |
| void | OnXRSelect (SelectEnterEventArgs args) |
| void | SetColor (Color c) |
Private Attributes | |
| Renderer | _renderer |
| MaterialPropertyBlock | _mpb |
| bool | _isSelected |
| Vector3 | _originalScale |
| XRBaseInteractable | _xrInteractable |
Static Private Attributes | |
| static readonly int | _colorID = Shader.PropertyToID("_Color") |
| static readonly int | _baseColorID = Shader.PropertyToID("_BaseColor") |
| static readonly int | _emissionColorID = Shader.PropertyToID("_EmissionColor") |
Componente físico sobre la mesa del Técnico. PC: hover (mouse) + click → selecciona y coloca en la bandeja. VR: rayo del controlador → hover + gatillo → mismo resultado.
SETUP VR (opcional — sin esto funciona solo en PC): Añadir XRSimpleInteractable al GameObject. No hace falta Rigidbody ni cambiar nada más; este script detecta el interactable automáticamente en Awake y conecta los eventos.
|
private |
| void DeskComponent.Deselect | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| void DeskComponent.SelectThisComponent | ( | ) |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
| Color DeskComponent.colorHover = new Color(0.9f, 0.8f, 0.2f) |
| Color DeskComponent.colorNormal = new Color(0.3f, 0.3f, 0.4f) |
| Color DeskComponent.colorSelected = new Color(0.2f, 0.8f, 0.4f) |
| string DeskComponent.componentDescription = "100 Ω" |
| ComponentType DeskComponent.componentType = ComponentType.Resistor |
| float DeskComponent.componentValue = 100f |
| float DeskComponent.emissionIntensity = 1.8f |
| float DeskComponent.selectedScaleMultiplier = 1.08f |
| ComponentSendingTray DeskComponent.tray |