Esempio n. 1
0
    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            dialogCharacterController.DoIntro(DialogCharacterController.Character.Left);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            dialogCharacterController.DoTalking(DialogCharacterController.Character.Left);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            dialogCharacterController.DoOutro(DialogCharacterController.Character.Left);
        }

        if (Input.GetKeyDown(KeyCode.Alpha0))
        {
            dialogCharacterController.DoIntro(DialogCharacterController.Character.Right);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha9))
        {
            dialogCharacterController.DoTalking(DialogCharacterController.Character.Right);
        }
        else if (Input.GetKeyDown(KeyCode.Alpha8))
        {
            dialogCharacterController.DoOutro(DialogCharacterController.Character.Right);
        }
    }
        public void HandleNextClick()
        {
            GameManager.Instance.PlaySoundClip("2 UI CLICK 1");
            if (currentDialogueSequence)
            {
                if (currentDialogueSequenceIndex < currentDialogueSequence.Dialogues.Count - 1)
                {
                    currentDialogueSequenceIndex++;
                    StoryDialogue dialogue = currentDialogueSequence.Dialogues[(int)currentDialogueSequenceIndex];

                    if (CharacterController)
                    {
                        if (dialogue.Speaker == LeftCharacter)
                        {
                            CharacterController.DoTalking(DialogCharacterController.Character.Left);
                        }

                        if (dialogue.Speaker == RightCharacter)
                        {
                            CharacterController.DoTalking(DialogCharacterController.Character.Right);
                        }
                    }

                    SetDialogue();
                }
                else
                {
                    Debug.LogError("We shouldn't have reached this point because the NextButtonPanel should be hidden.");
                }
            }
        }