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

Slot físico donde el Explorador instala un componente recibido del Técnico. CORRECCIONES respecto a la versión anterior: More...

Inheritance diagram for ComponentSlot:
Inheritance graph
Collaboration diagram for ComponentSlot:
Collaboration graph

Public Member Functions

void ReleaseComponent ()

Public Attributes

ComponentSlotType acceptedType = ComponentSlotType.Resistor
ComponentDeliverySystem delivery
GameManager gameManager
Renderer slotRenderer
Color colorNormal = new Color(0.3f, 0.3f, 0.3f)
Color colorHover = new Color(0.9f, 0.9f, 0.2f)
Color colorCorrect = new Color(0.2f, 0.9f, 0.3f)
Color colorWrong = new Color(0.9f, 0.2f, 0.2f)
Transform installAnchor

Private Member Functions

void Awake ()
void OnTriggerEnter (Collider other)
void OnTriggerStay (Collider other)
void OnTriggerExit (Collider other)
void InstallComponent (GameObject comp)
ComponentType DetectComponentType (GameObject obj)
bool MatchesSlotType (ComponentType c, ComponentSlotType s)
void SetColor (Color c)
void ResetColor ()
void OnDrawGizmos ()

Private Attributes

bool _hasComponent = false
GameObject _installed
MaterialPropertyBlock _mpb

Static Private Attributes

static readonly int _colorID = Shader.PropertyToID("_BaseColor")

Detailed Description

Slot físico donde el Explorador instala un componente recibido del Técnico. CORRECCIONES respecto a la versión anterior:

  1. delivery.OnExplorerInstalled() solo se llama cuando el tipo COINCIDE.
  2. Se llama gameManager.RegisterRepairAction() al instalar correctamente, lo que dispara CheckReto1() / CheckReto2() automáticamente.
  3. Si el tipo NO coincide, se llama RegisterWrongAttempt() para el log.

Member Function Documentation

◆ Awake()

void ComponentSlot.Awake ( )
private

◆ DetectComponentType()

ComponentType ComponentSlot.DetectComponentType ( GameObject obj)
private

◆ InstallComponent()

void ComponentSlot.InstallComponent ( GameObject comp)
private

◆ MatchesSlotType()

bool ComponentSlot.MatchesSlotType ( ComponentType c,
ComponentSlotType s )
private

◆ OnDrawGizmos()

void ComponentSlot.OnDrawGizmos ( )
private

◆ OnTriggerEnter()

void ComponentSlot.OnTriggerEnter ( Collider other)
private

◆ OnTriggerExit()

void ComponentSlot.OnTriggerExit ( Collider other)
private

◆ OnTriggerStay()

void ComponentSlot.OnTriggerStay ( Collider other)
private

◆ ReleaseComponent()

void ComponentSlot.ReleaseComponent ( )

◆ ResetColor()

void ComponentSlot.ResetColor ( )
private

◆ SetColor()

void ComponentSlot.SetColor ( Color c)
private

Member Data Documentation

◆ _colorID

readonly int ComponentSlot._colorID = Shader.PropertyToID("_BaseColor")
staticprivate

◆ _hasComponent

bool ComponentSlot._hasComponent = false
private

◆ _installed

GameObject ComponentSlot._installed
private

◆ _mpb

MaterialPropertyBlock ComponentSlot._mpb
private

◆ acceptedType

ComponentSlotType ComponentSlot.acceptedType = ComponentSlotType.Resistor

◆ colorCorrect

Color ComponentSlot.colorCorrect = new Color(0.2f, 0.9f, 0.3f)

◆ colorHover

Color ComponentSlot.colorHover = new Color(0.9f, 0.9f, 0.2f)

◆ colorNormal

Color ComponentSlot.colorNormal = new Color(0.3f, 0.3f, 0.3f)

◆ colorWrong

Color ComponentSlot.colorWrong = new Color(0.9f, 0.2f, 0.2f)

◆ delivery

ComponentDeliverySystem ComponentSlot.delivery

◆ gameManager

GameManager ComponentSlot.gameManager

◆ installAnchor

Transform ComponentSlot.installAnchor

◆ slotRenderer

Renderer ComponentSlot.slotRenderer

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