Example #1
0
    private void ManageSequenceStepDialog(AnimationData animData)
    {
        List <MessageDialog> msgList = new List <MessageDialog>();

        foreach (MessageDialog msg in animData.messageDialogList)
        {
            if (animData.character != null)
            {
                Character     animCharacter = animData.character;
                MessageDialog simpleMessage = new MessageDialog(animCharacter.charStats.avatar, animCharacter.charStats.name, msg.dialogText, msg.nextSequenceStep);
                msgList.Add(simpleMessage);
            }
            else if (msg.avatarImage != null)
            {
                msgList.Add(msg);
            }
            else
            {
                MessageDialog simpleMessage = new MessageDialog();
                simpleMessage.dialogText       = msg.dialogText;
                simpleMessage.nextSequenceStep = msg.nextSequenceStep;
                msgList.Add(simpleMessage);
            }
        }
        dialogController.SetMessagesArray(msgList);
        dialogController.ShowMessage();
    }
Example #2
0
 IEnumerator ManageButtonDown()
 {
     //Si el cofre no está dentro mensaje de que hay libros desordenados pero no llega
     if ((!chestInside || !playerController.isOnChest) && !msgController.IsDialogActive && !waitingUntilNewMessage)
     {
         //waitingUntilNewMessage = true;
         if (!libraryLocked)
         {
             libraryLocked = true;
             MessageDialog        msg     = new MessageDialog(girlStats.avatar, girlStats.name, "Library.cantReach");
             List <MessageDialog> msgList = new List <MessageDialog>();
             msgList.Add(msg);
             msgController.SetMessagesArray(msgList);
             msgController.ShowMessage();
         }
         else
         {
             libraryLocked = false;
         }
     }
     else if (!Game.puzzleBooksFinished && playerController.isOnChest && !sequencer.isOnSequence && !waitingUntilNewMessage && !msgController.IsDialogActive)
     {
         //Si el cofre está dentro y ella está encima y no se ha hecho el puzle de la libreria iniciar puzle de la libreria mediante secuencia
         waitingUntilNewMessage = true;
         lirbaryPuzzlePanel.SetActive(true);
     }
     yield return(null);
 }
Example #3
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.M) && !dialogsController.IsDialogActive)
     {
         CreateMessage();
         dialogsController.SetMessagesArray(msgList);
         dialogsController.ShowMessage();
     }
 }
Example #4
0
    protected void ShowMessage(string key)
    {
        MessageDialog        girlMsg2 = new MessageDialog(girlStats.avatar, girlStats.name, key);
        List <MessageDialog> msgList  = new List <MessageDialog>();

        msgList.Add(girlMsg2);
        msgController.SetMessagesArray(msgList);
        msgController.ShowMessage();
    }
Example #5
0
    protected IEnumerator ShowFailMessage()
    {
        yield return(null);

        CharacterStats       charStats   = playerController.gameObject.GetComponent <PlayableCharacter> ().charStats;
        MessageDialog        msg1        = new MessageDialog(charStats.avatar, charStats.name, "Puzzle.Fail", true);
        List <MessageDialog> messageList = new List <MessageDialog> ();

        messageList.Add(msg1);
        messageDialogController.SetMessagesArray(messageList);
        messageDialogController.ShowMessage();

        yield return(null);

        gameObject.SetActive(false);
    }
Example #6
0
    void Update()
    {
        if (playerInside)
        {
            if (Input.GetButtonDown(OSInputManager.GetPadMapping("Submit")) && animator.GetFloat("y") == 1f && !msgController.IsDialogActive)
            {
                //Caso 1: Niño aparece y no ha ocurrido el evento de "mirar el reloj tontamente"
                if (Game.boyAppeared && !Game.conversationAboutClockDone)
                {
                    Game.conversationAboutClockDone = true;
                    CharacterStats boyStats = CharacterParty.charactersParty.Find(p => p.charStats.name.Equals(boyName)).charStats;

                    List <MessageDialog> msgList  = new List <MessageDialog> ();
                    MessageDialog        boyMsg1  = new MessageDialog(boyStats.avatar, boyStats.name, "ClockConversation.Part1");
                    MessageDialog        girlMsg1 = new MessageDialog(girlStats.avatar, girlStats.name, "ClockConversation.Part2");
                    MessageDialog        boyMsg2  = new MessageDialog(boyStats.avatar, boyStats.name, "ClockConversation.Part3");

                    msgList.Add(boyMsg1);
                    msgList.Add(girlMsg1);
                    msgList.Add(boyMsg2);


                    if (!Game.puzzleClockFinished)
                    {
                        MessageDialog girlMsg2 = new MessageDialog(girlStats.avatar, girlStats.name, "ClockConversation.Part4");
                        msgList.Add(girlMsg2);
                    }

                    msgController.SetMessagesArray(msgList);
                    msgController.ShowMessage();
                }//Caso 2: Puzle del reloj
                else if (!Game.puzzleClockFinished && !clockPuzzlePanel.activeSelf && !sequencer.isOnSequence && !waitingUntilNewMessage && !msgController.IsDialogActive && msgController.releaseConversation)
                {
                    waitingUntilNewMessage = true;
                    sequencer.StartCoroutine("StartSequence", sequenceName);
                }
            }
        }
    }
Example #7
0
    public IEnumerator DoorLocked()
    {
        //PlaySound
        audioSource.Play();
        yield return(new WaitForSeconds(1));

        MessageDialog msg = null;

        if (sequencer.isOnSequence)
        {
            msg = new MessageDialog(playerStats.avatar, playerStats.name, messageOnIntro, true);
        }
        else
        {
            msg = new MessageDialog(playerStats.avatar, playerStats.name, messageOnTrigger, false);
        }

        List <MessageDialog> msgList = new List <MessageDialog>();

        msgList.Add(msg);
        msgController.SetMessagesArray(msgList);
        msgController.ShowMessage();
    }