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

Vive en la escena Explorador.unity. Escucha GameSession.OnComponenteRecibido y spawna el componente físico en la bandeja del Explorador para que pueda instalarlo. More...

Inheritance diagram for ExplorerComponentReceiver:
Inheritance graph
Collaboration diagram for ExplorerComponentReceiver:
Collaboration graph

Public Attributes

Transform puntoDeEntrega
GameObject resistorPrefab
GameObject ledPrefab
GameObject capacitorPrefab
GameObject arduinoPinPrefab
ComponentDeliverySystem delivery

Private Member Functions

void OnEnable ()
void OnDisable ()
void HandleComponenteRecibido (ComponentType tipo, float valor)
void HandleRetoChanged (int reto)
void ConfigurarComponente (GameObject obj, ComponentType tipo, float valor)

Private Attributes

GameObject _componenteActual

Detailed Description

Vive en la escena Explorador.unity. Escucha GameSession.OnComponenteRecibido y spawna el componente físico en la bandeja del Explorador para que pueda instalarlo.

SETUP EN UNITY (escena Explorador):

  1. Añadir este script a cualquier GameObject (ej. "ComponentReceiver").
  2. Asignar puntoDeEntrega → Transform de la Bandeja_Recepcion del Explorador.
  3. Asignar los prefabs de componentes (mismos que usa ComponentDeliverySystem).
  4. Asignar delivery → ComponentDeliverySystem de la escena (para OnExplorerInstalled).

Member Function Documentation

◆ ConfigurarComponente()

void ExplorerComponentReceiver.ConfigurarComponente ( GameObject obj,
ComponentType tipo,
float valor )
private

◆ HandleComponenteRecibido()

void ExplorerComponentReceiver.HandleComponenteRecibido ( ComponentType tipo,
float valor )
private

◆ HandleRetoChanged()

void ExplorerComponentReceiver.HandleRetoChanged ( int reto)
private

◆ OnDisable()

void ExplorerComponentReceiver.OnDisable ( )
private

◆ OnEnable()

void ExplorerComponentReceiver.OnEnable ( )
private

Member Data Documentation

◆ _componenteActual

GameObject ExplorerComponentReceiver._componenteActual
private

◆ arduinoPinPrefab

GameObject ExplorerComponentReceiver.arduinoPinPrefab

◆ capacitorPrefab

GameObject ExplorerComponentReceiver.capacitorPrefab

◆ delivery

ComponentDeliverySystem ExplorerComponentReceiver.delivery

◆ ledPrefab

GameObject ExplorerComponentReceiver.ledPrefab

◆ puntoDeEntrega

Transform ExplorerComponentReceiver.puntoDeEntrega

◆ resistorPrefab

GameObject ExplorerComponentReceiver.resistorPrefab

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