|
Serious Game - Electrónica VR 1.0.0
|
Controlador principal del juego. Gestiona los 4 retos del Serious Game VR. Usa eventos para comunicarse con UI y otros sistemas (sin acoplamiento directo). More...


Public Member Functions | |
| void | RegisterRepairAction () |
| Registra que se realizó una reparación y resimula el circuito. | |
| void | RegisterWrongAttempt (string reason="") |
| Registra un intento incorrecto del Técnico. | |
| bool | HasPerformedRepair () |
| int | GetWrongAttempts () |
| void | NextLevel () |
| void | RestartCurrentLevel () |
| Reinicia el reto actual desde cero (conserva el índice). | |
| void | GoToLevel (int index) |
| Salta directamente a un reto. Solo funciona con _debugMode activo. | |
| bool | IsVoltageCorrect () |
Public Attributes | |
| CircuitManager | circuit |
| Multimeter | multimeter |
| PerformanceTracker | performance |
| InstructionSystem | instructionSystem |
| GameObject | reto1Zone |
| GameObject | reto2Zone |
| GameObject | reto3Zone |
| GameObject | reto4Zone |
| float | zoneTransitionDelay = 3f |
| float[] | timeLimits = { 480f, 600f, 720f, 900f } |
Properties | |
| LevelType | currentLevel [get] |
| bool | levelCompleted [get] |
| float | currentTimeLimit [get] |
| float | remainingTime [get] |
| bool | timerActive [get] |
Events | |
| static Action< LevelType > | OnLevelLoaded |
| static Action< LevelType, bool > | OnLevelCompleted |
| static Action< string > | OnFaultDetected |
| static Action | OnGameCompleted |
| static Action< float > | OnTimerTick |
| static Action< LevelType > | OnTimerExpired |
| static Action< int > | OnZoneActivated |
| Zona activada: índice 0-3. Útil para UI y efectos de transición. | |
| static Action< LevelType, bool > | OnZoneTransitionStart |
| Disparado justo antes de cargar el siguiente reto. | |
Private Member Functions | |
| void | Awake () |
| void | Start () |
| void | Update () |
| void | OnDestroy () |
| void | LoadLevel (int index) |
| void | SetupLevel () |
| void | ActivateComponentsForLevel (LevelType level) |
| Activa solo los componentes necesarios para el reto actual. Desactiva los demás para evitar que interfieran con la simulación. | |
| void | SetupReto1 () |
| void | CheckReto1 () |
| void | SetupReto2 () |
| void | CheckReto2 () |
| void | SetupReto3 () |
| void | SetupMixedNodeVoltages () |
| void | CheckReto3 () |
| void | SetupReto4 () |
| void | CheckReto4 () |
| void | CheckWinCondition () |
| Se llama automáticamente cada vez que el circuito cambia. | |
| void | CompleteLevel (bool success) |
| IEnumerator | TransitionToNextLevel () |
| void | CompleteGame () |
| void | ValidateZones () |
Private Attributes | |
| bool | _debugMode = false |
| LevelType | _currentLevel = LevelType.OhmLaw |
| int | _currentIndex = 0 |
| bool | _levelCompleted = false |
| bool | _repairPerformed = false |
| int | _wrongAttempts = 0 |
| float | _remainingTime = 0f |
| bool | _timerActive = false |
Static Private Attributes | |
| const float | RETO1_FAULTY_RESISTANCE = 10f |
| const float | RETO1_CORRECT_RESISTANCE = 100f |
| const float | RETO1_LED_RESISTANCE = 50f |
| const float | RETO1_SOURCE_VOLTAGE = 9f |
| const float | RETO1_TARGET_VOLTAGE = 9f |
| const float | RETO1_TOLERANCE = 0.5f |
| const float | RETO2_BROKEN_RESISTANCE = 9999f |
| const float | RETO2_NORMAL_RESISTANCE = 50f |
| const float | RETO3_FAULTY_RESISTANCE = 470f |
| const float | RETO3_CORRECT_RESISTANCE = 220f |
Controlador principal del juego. Gestiona los 4 retos del Serious Game VR. Usa eventos para comunicarse con UI y otros sistemas (sin acoplamiento directo).
Niveles: 1) Ohm's Law: Circuito serie con resistencia defectuosa. 2) Parallel: Circuito paralelo con una rama abierta. 3) Mixed: Circuito mixto con LED y capacitor con polaridad invertida + resistencia errónea. 4) Arduino: Sensor conectado al pin incorrecto + buzzer sin resistencia + cable suelto.
|
private |
Activa solo los componentes necesarios para el reto actual. Desactiva los demás para evitar que interfieran con la simulación.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Se llama automáticamente cada vez que el circuito cambia.
|
private |
|
private |
| int GameManager.GetWrongAttempts | ( | ) |
| void GameManager.GoToLevel | ( | int | index | ) |
Salta directamente a un reto. Solo funciona con _debugMode activo.
| bool GameManager.HasPerformedRepair | ( | ) |
| bool GameManager.IsVoltageCorrect | ( | ) |
|
private |
| void GameManager.NextLevel | ( | ) |
|
private |
| void GameManager.RegisterRepairAction | ( | ) |
Registra que se realizó una reparación y resimula el circuito.
| void GameManager.RegisterWrongAttempt | ( | string | reason = "" | ) |
Registra un intento incorrecto del Técnico.
| void GameManager.RestartCurrentLevel | ( | ) |
Reinicia el reto actual desde cero (conserva el índice).
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| CircuitManager GameManager.circuit |
| InstructionSystem GameManager.instructionSystem |
| Multimeter GameManager.multimeter |
| PerformanceTracker GameManager.performance |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
| GameObject GameManager.reto1Zone |
|
staticprivate |
|
staticprivate |
| GameObject GameManager.reto2Zone |
|
staticprivate |
|
staticprivate |
| GameObject GameManager.reto3Zone |
| GameObject GameManager.reto4Zone |
| float [] GameManager.timeLimits = { 480f, 600f, 720f, 900f } |
| float GameManager.zoneTransitionDelay = 3f |
|
get |
|
get |
|
get |
|
get |
|
get |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Zona activada: índice 0-3. Útil para UI y efectos de transición.
|
static |
Disparado justo antes de cargar el siguiente reto.