|
Serious Game - Electrónica VR 1.0.0
|
Sistema de entrega asimétrica de componentes — VERSIÓN CORRECTA. More...


Public Member Functions | |
| void | SendResistor (float resistanceValue) |
| El Técnico envía una resistencia con CUALQUIER valor. NO se valida aquí — el Explorador recibirá el componente igualmente. La validación real sucede cuando se instala en un slot. | |
| void | SendLED (bool correctPolarity=true) |
| El Técnico envía un LED con la polaridad que decidió. Si se equivoca, el LED no encenderá al instalarse. | |
| void | SendCapacitor (bool correctPolarity=true) |
| El Técnico envía un capacitor con la polaridad elegida. | |
| void | SendArduinoPin (int pinNumber) |
| El Técnico envía un pin Arduino. | |
| void | OnExplorerInstalled (ComponentSlot slot) |
| Llamado por ComponentSlot cuando el Explorador instala un componente. | |
| bool | HasPendingDelivery () |
| void | CancelDelivery () |
| void | PrepareForInstall (ComponentType tipo, float valor) |
| Llamado por ExplorerComponentReceiver cuando llega un componente desde la red. Prepara el estado local sin spawnear (el objeto ya fue instanciado por el Receiver). | |
Public Attributes | |
| GameManager | gameManager |
| Transform | puntoDeEntrega |
| GameObject | resistorPrefab |
| GameObject | ledPrefab |
| GameObject | capacitorPrefab |
| GameObject | arduinoPinPrefab |
Events | |
| static Action< ComponentType, float > | OnComponentSent |
| static Action< bool > | OnComponentInstalled |
| static Action< bool > | OnRepairValidated |
| static Action< string > | OnDeliveryError |
Private Member Functions | |
| void | OnEnable () |
| void | OnDisable () |
| void | OnLevelLoaded (LevelType _) |
| void | SpawnInDeliveryTray (GameObject prefab, float value) |
| void | ConfigureSpawnedComponent (GameObject comp, float value) |
| Aplica el valor/polaridad al componente físico spawneado. Así el componente visible en la bandeja REFLEJA lo que envió el Técnico. | |
| bool | ValidateValueForRepair () |
| void | ApplyRepairToCircuit () |
| void | ApplyIncorrectValueToCircuit () |
| Aplica el valor INCORRECTO al circuito para que el Explorador vea el efecto visual — LED sigue rojo, humo, sobrecarga, etc. El circuito NO se marca como reparado. | |
| ComponentSlotType | GetSlotTypeFor (ComponentType type) |
| void | ResetDeliveryState () |
| void | CancelPendingDelivery () |
Private Attributes | |
| ComponentType | _pendingType = ComponentType.None |
| float | _pendingValue = 0f |
| bool | _waitingForInstall = false |
| GameObject | _spawnedComponent |
Sistema de entrega asimétrica de componentes — VERSIÓN CORRECTA.
DISEÑO CLAVE (estilo Keep Talking and Nobody Explodes):
Esto preserva el gameplay asimétrico real: el Técnico puede equivocarse, el Explorador ve las consecuencias, y entre los dos deben resolverlo.
|
private |
Aplica el valor INCORRECTO al circuito para que el Explorador vea el efecto visual — LED sigue rojo, humo, sobrecarga, etc. El circuito NO se marca como reparado.
|
private |
| void ComponentDeliverySystem.CancelDelivery | ( | ) |
|
private |
|
private |
Aplica el valor/polaridad al componente físico spawneado. Así el componente visible en la bandeja REFLEJA lo que envió el Técnico.
|
private |
| bool ComponentDeliverySystem.HasPendingDelivery | ( | ) |
|
private |
|
private |
| void ComponentDeliverySystem.OnExplorerInstalled | ( | ComponentSlot | slot | ) |
Llamado por ComponentSlot cuando el Explorador instala un componente.
Hay DOS niveles de validación:
|
private |
| void ComponentDeliverySystem.PrepareForInstall | ( | ComponentType | tipo, |
| float | valor ) |
Llamado por ExplorerComponentReceiver cuando llega un componente desde la red. Prepara el estado local sin spawnear (el objeto ya fue instanciado por el Receiver).
|
private |
| void ComponentDeliverySystem.SendArduinoPin | ( | int | pinNumber | ) |
El Técnico envía un pin Arduino.
| void ComponentDeliverySystem.SendCapacitor | ( | bool | correctPolarity = true | ) |
El Técnico envía un capacitor con la polaridad elegida.
| void ComponentDeliverySystem.SendLED | ( | bool | correctPolarity = true | ) |
| void ComponentDeliverySystem.SendResistor | ( | float | resistanceValue | ) |
El Técnico envía una resistencia con CUALQUIER valor. NO se valida aquí — el Explorador recibirá el componente igualmente. La validación real sucede cuando se instala en un slot.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| GameObject ComponentDeliverySystem.arduinoPinPrefab |
| GameObject ComponentDeliverySystem.capacitorPrefab |
| GameManager ComponentDeliverySystem.gameManager |
| GameObject ComponentDeliverySystem.ledPrefab |
| Transform ComponentDeliverySystem.puntoDeEntrega |
| GameObject ComponentDeliverySystem.resistorPrefab |
|
static |
|
static |
|
static |
|
static |