Esempio n. 1
0
        public Lady() : base()
        {
            Name        = "Woman";
            Description = "Typical pasty peasant woman, overbearing and judgemental. Obsessed with goods and land.";
            Dialogue.Add("noTrinket", @"She looks up. 
'Oh, hello. I seem to have lost my mother's heirloom. If you find it, would you please bring it to me?'");
        }
Esempio n. 2
0
        public Kerrek() : base()
        {
            Name        = "Kerrek";
            Description = "It's the Kerrek, you moron! Get outta here!";
            Dialogue.Add("alive", @"'Me llamo Julio,' you begin... It seems only to further anger the already tempramental Kerrek. 
That stupid 'Learn Kerrek in 3 Weeks' cassette did nothing for you!
The Kerrek bonks you over the head and drives your skull into your ribcage.");
            Dialogue.Add("dead", "The Kerrek doesn't respond on accounts of being dead.");
        }
Esempio n. 3
0
        public Dialog(DialogLine[] dialog, Vector3 pos, float stopDistance = 2f)
        {
            Lines          = dialog;
            Position       = pos;
            DistanceToStop = stopDistance;

            foreach (var d in dialog)
            {
                Dialogue.Add(d.Text);
            }
        }
Esempio n. 4
0
        public Knight() : base()
        {
            Name        = "Knight";
            Description = "He looks way cooler than you.";
            Dialogue.Add("talk", @"
You explain your situation to the knight. That Trogdor burninated your cottage and you've sworn revenge. You ask for passage up the mountain to settle your score. 
'Hang on there, Trogdorkilla, ' says the knight. 'I can only allow actual peasants up the mountain pass to face Trogdor. And you CLEARLY are not one.'
'Look, Dragonheart...'
'You don't STINK like a peasant.'
'You don't DRESS like a peasant.'
'And you're definitely not ON FIRE like a peasant.'
'Once you're those 3 things, come back and maybe we can talk.'
      ");
        }
    // Use this for initialization
    void Start()
    {
        beenTriggered   = false;
        canBeTrigerred  = false;
        dialogueBoxOpen = false;


        screenWidth  = Screen.width;        //is 1336 when the window is fullscreen
        screenHeight = Screen.height;
        textSize     = 20 * (screenWidth / 1336);
        dialogueSkin.box.fontSize = (int)textSize;



        txt = (TextAsset)Resources.Load("TextResources/" + fileName, typeof(TextAsset));
        theWholeTextFile = txt.text;
        //parse the file.
        linesFromtxtFile = theWholeTextFile.Split('\n');
        // read this array into trigName, speaker, and dialogue
        int i = 0;

        while (i + 2 < linesFromtxtFile.Length)
        {
            trigName.Add(linesFromtxtFile[i]);
            i++;
            speaker.Add(linesFromtxtFile[i]);
            i++;
            dialogue.Add(linesFromtxtFile[i]);
            i++;
        }



        /////GET THE DIALOGUE BOX ELEMENTS OF THE CANVAS
        dialogueBox = GameObject.FindGameObjectWithTag("Canvas").transform.FindChild("DialogueBox").gameObject;
        dialogueBox.SetActive(false);
        speakerBox     = dialogueBox.transform.FindChild("SpeakerPic").gameObject;
        dialogueHolder = dialogueBox.transform.FindChild("TextHolder").FindChild("Dialogue").gameObject;
        dialogueText   = dialogueHolder.transform.GetComponent <Text>();
        speakerPic     = speakerBox.transform.GetComponent <RawImage>();
        //speakerPic.texture = drFrizPic;
        //dialogueText.text = "The text is hello world";



        //this pushes the text into box to make toom for the picture
        dialogueSkin.box.padding.left = (int)(0.2f * screenHeight);
    }
Esempio n. 6
0
        //해당 대화중 가장 마지막 문자로 갱신함. 대화가 없다면 생성하여 전체탭에 추가.
        private void UpdateLastMessage(TextMessage objSMS)
        {
            //이 thread_id에 해당하는 대화가 없으면 새로 생성 후 전체탭에 추가
            if (FindDialogue(objSMS.Thread_id) == null)
            {
                _TotalDialogueSet.DialogueList.Add(objSMS.Thread_id, CreateNewDialogue(objSMS));
            }

            Dialogue objDialogue = _TotalDialogueSet[objSMS.Thread_id];

            if (objDialogue.Count > 0)
            {
                //대상 문자가 최신이 아니라면 기존 문자 유지, 대상 문자가 더 최신이면 대상 문자로 갱신.
                if (objDialogue[0].Time > objSMS.Time)
                {
                    return;
                }
                else
                {
                    objDialogue.TextMessageList.Clear();
                }
            }
            objDialogue.Add(objSMS);
        }
Esempio n. 7
0
 public void AddStoryBoard(ITalk i, string s)
 {
     Storyboard.Add(i, s);
 }