示例#1
0
        public void BeginDialogue(Character ConversationStarter)
        {
            // Now have speech bubbles pop up
            if (MySpeechBubble.CanTalk() && ConversationStarter.GetSpeechHandler().CanTalk())
            {
                /*if (gameObject.GetComponent<Wander>()) {
                    gameObject.GetComponent<Wander>().ToggleWander(false);
                    gameObject.GetComponent<Movement>().LookAt(ConversationStarter.gameObject);
                }*/
                MySpeechBubble.StartConversation(ConversationStarter, this);

                OnBeginTalking.Invoke();
                if (OnBeginTalkingSound != null)
                    MySource.PlayOneShot (OnBeginTalkingSound);
            }
        }
        // example: the player starts the conversation, second character is the npc
        public void StartConversation(Character FirstCharacter, Character SecondCharacter)
        {
            //Debug.LogError ("Inside of: " + name + " - at: " + Time.time);
            //Debug.LogError ("Char1: " + FirstCharacter.name + " - Char2: " + SecondCharacter.name);
            FirstCharacter.GetSpeechHandler().SetCharacter2(SecondCharacter);
            FirstCharacter.GetSpeechHandler().SetSecondaryTalker();
            FirstCharacter.GetSpeechHandler ().IsTalking = true;

            SetCharacter2(FirstCharacter);
            ToggleSpeech (true, false);
            SetMainTalker();
            Activate ();
        }