예제 #1
0
    public void Load(DStoryElement DS)
    {
        NPCName  = DS.NPCName;
        Portrait = Resources.Load <Sprite> (DS.Portrait);

        for (int s = 0; s < DS.DialogueBoxes.Count; s++)
        {
            GameObject DSX = Instantiate(Resources.Load("TemplateDialogue")) as GameObject;
            DSX.name = DS.DialogueBoxes[s].SID;
            DSX.GetComponent <StoryDialogue> ().DS9     = DS.DialogueBoxes [s];
            DSX.GetComponent <StoryDialogue>().CID      = DSX.GetComponent <StoryDialogue>().DS9.CID;
            DSX.GetComponent <StoryDialogue>().SID      = DSX.GetComponent <StoryDialogue>().DS9.SID;
            DSX.GetComponent <StoryDialogue>().TextBody = DSX.GetComponent <StoryDialogue>().DS9.TextBody;          //DS.DialogueBoxes [s].TextBody;
            DialogueBoxes.Add(DSX.GetComponent <StoryDialogue>());
            DSX.transform.parent = gameObject.transform;
        }
    }
예제 #2
0
 public void LoadConversation(DStoryElement DS)
 {
     ConversationSystem.GetComponent <SConversationSystem>().NPCName.text       = DS.NPCName;
     ConversationSystem.GetComponent <SConversationSystem>().ConverserBody.text = DS.DialogueBoxes[0].TextBody;
     ConversationSystem.GetComponent <SConversationSystem>().Converser.sprite   = Resources.Load <Sprite> (DS.Portrait);
 }