Example #1
0
 //Dialogo
 public void AbreCierraDialogueCanvas()
 {
     if (!dialogueBox.activeInHierarchy && !GameManager.instance.ventanaAbierta)
     {
         transform.SetAsLastSibling();
         GameManager.instance.ventanaAbierta = true;
         dialogueBox.SetActive(true);
         MessageManager.instance.CloseMessage();
         if (currentNPC != null)
         {
             ActualizaInicioDelCanvas();
             SeleccionaBoton();
         }
     }
     else if (dialogueBox.activeInHierarchy && !GameManager.instance.pauseMode)
     {
         dialogueBox.SetActive(false);
         InputConfiguration.DeselectButton();
         if (currentNPC != null)
         {
             MessageManager.instance.ShowMessage("Pulsa " + GameManager.instance.botonInteractuar.ToString() + " para interactuar.");
         }
         GameManager.instance.ventanaAbierta = false;
     }
 }
Example #2
0
 void CheckInputPause()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (pausaMenu.activeInHierarchy)
         {
             pausaMenu.SetActive(false);
             panelOpciones.gameObject.SetActive(false);
             botones.gameObject.SetActive(false);
             GameManager.instance.pauseMode = false;
             //Time.timeScale = 1;
             InputConfiguration.SelectFirstFoundButton();
         }
         else
         {
             transform.SetAsLastSibling();
             pausaMenu.SetActive(true);
             botones.SetActive(true);
             InputConfiguration.DeselectButton();
             botonesDelMenu [0].Select();
             GameManager.instance.pauseMode = true;
             //Time.timeScale = 0;
         }
     }
 }
Example #3
0
 public void AbreYCierraInventario()
 {
     if (!inventory.gameObject.activeInHierarchy && !DialogueManager.instance.dialogueBox.activeInHierarchy && !GameManager.instance.pauseMode && !GameManager.instance.ventanaAbierta)
     {
         transform.SetAsLastSibling();
         inventory.gameObject.SetActive(true);
         GameManager.instance.ventanaAbierta = true;
         //Selecciona el primer Slot en el inventario
         slots [0].boton.Select();
         mensajeNoSustitucion.gameObject.SetActive(true);
     }
     else if (inventory.gameObject.activeInHierarchy && !GameManager.instance.pauseMode)
     {
         if (mensajeSustitucion.IsActive())
         {
             mensajeSustitucion.gameObject.SetActive(false);
             modoSustitucion = false;
         }
         if (!DialogueManager.instance.dialogueBox.activeInHierarchy)
         {
             GameManager.instance.ventanaAbierta = false;
         }
         InputConfiguration.DeselectButton();
         inventory.gameObject.SetActive(false);
         mensajeNoSustitucion.gameObject.SetActive(false);
     }
 }
Example #4
0
 void CheckInput()
 {
     if (Input.GetKeyDown(botonAbrirYCerrar))
     {
         if (!missionBox.activeInHierarchy && !GameManager.instance.ventanaAbierta && !GameManager.instance.pauseMode)
         {
             transform.SetAsLastSibling();
             missionBox.SetActive(true);
             GameManager.instance.ventanaAbierta = true;
             derecha.Select();
         }
         else if (missionBox.activeInHierarchy && !GameManager.instance.pauseMode)
         {
             GameManager.instance.ventanaAbierta = false;
             InputConfiguration.DeselectButton();
             missionBox.SetActive(false);
             paginaCont = 1;
         }
     }
 }
Example #5
0
 public void Exit()
 {
     tienda_.gameObject.SetActive(false);
     GameManager.instance.ventanaAbierta = false;
     InputConfiguration.DeselectButton();
 }