public DialogueLine(DialogueManager.Character ch, string ct, DialogueManager.Expression e, string p,
                     DialogueManager.Character cr  = DialogueManager.Character.end,
                     DialogueManager.Expression re = DialogueManager.Expression.neutral)
 {
     character   = ch;
     content     = ct;
     expression  = e;
     position    = p;
     options     = new string[1];
     receiving   = cr;
     rExpression = re;
 }
Beispiel #2
0
 public void Draw()
 {
     if (readyToInit && !initialized)
     {
         Init();
     }
     else
     {
         GUIContent content = new GUIContent(dialogue);
         float      height  = textfieldStyle.CalcHeight(content, rect.width - 20);
         rect.height = defaultRect.height + height;
         float advancedHeight     = advancedOptions ? 140 : 0;
         float restrictionsHeight = restrictions ? 80 : 0;
         rect.height += advancedHeight;
         rect.height += restrictionsHeight;
         inPoint.Draw();
         outPoint.Draw();
         GUI.Box(rect, title, style);
         dialogue  = EditorGUI.TextField(new Rect(rect.x + 10, rect.y + 70, rect.width - 20, height), dialogue, textfieldStyle);
         character = (DialogueManager.Character)EditorGUI.EnumPopup(
             new Rect(rect.x + 10, rect.y + 25, rect.width - 20, 15), character);
         expression = (DialogueManager.Expression)EditorGUI.EnumPopup(
             new Rect(rect.x + 10, rect.y + 45, rect.width - 20, 15), expression);
         content         = new GUIContent("<color=white>Advanced Options</color>");
         advancedOptions = EditorGUI.Foldout(new Rect(rect.x + 10, rect.y + 80 + height, rect.width - 20, 15), advancedOptions, content, foldoutStyle);
         content         = new GUIContent("<color=white>Restrictions</color>");
         restrictions    = EditorGUI.Foldout(new Rect(rect.x + 10, rect.y + 100 + height + advancedHeight, rect.width - 20, 15), restrictions, content, foldoutStyle);
         if (advancedOptions)
         {
             content = new GUIContent("<color=white>NPC Affected</color>");
             EditorGUI.LabelField(new Rect(rect.x + 15, rect.y + 100 + height, 80, 15), content);
             characterAffected = (DialogueManager.Character)EditorGUI.EnumPopup(
                 new Rect(rect.x + 110, rect.y + 100 + height, rect.width - 130, 15), characterAffected);
             content    = new GUIContent("<color=white>Force Left</color>");
             forceLeft  = EditorGUI.Toggle(new Rect(rect.x + 15, rect.y + 120 + height, rect.width - 20, 15), content, forceLeft);
             content    = new GUIContent("<color=white>Long Option</color>");
             longOption = EditorGUI.Toggle(new Rect(rect.x + 15, rect.y + 140 + height, rect.width - 20, 15), content, longOption);
             content    = new GUIContent("<color=white>Positive Interaction</color>");
             positive   = EditorGUI.Toggle(new Rect(rect.x + 15, rect.y + 160 + height, rect.width - 20, 15), content, positive);
             content    = new GUIContent("<color=white>Negative Interaction</color>");
             negative   = EditorGUI.Toggle(new Rect(rect.x + 15, rect.y + 180 + height, rect.width - 20, 15), content, negative);
             content    = new GUIContent("<color=white>Info Gathered</color>");
             EditorGUI.LabelField(new Rect(rect.x + 15, rect.y + 200 + height, 80, 15), content);
             infoGathered = EditorGUI.IntField(new Rect(rect.x + 150, rect.y + 200 + height, rect.width - 170, 15), infoGathered);
             content      = new GUIContent("<color=white>Fired</color>");
             fired        = EditorGUI.Toggle(new Rect(rect.x + 15, rect.y + 220 + height, rect.width - 20, 15), content, fired);
         }
         if (restrictions)
         {
             content = new GUIContent("<color=white>NPC Required</color>");
             EditorGUI.LabelField(new Rect(rect.x + 15, rect.y + 120 + height + advancedHeight, 150, 15), content);
             characterRestriction = (DialogueManager.Character)EditorGUI.EnumPopup(
                 new Rect(rect.x + 110, rect.y + 120 + height + advancedHeight, rect.width - 130, 15), characterRestriction);
             content = new GUIContent("<color=white>Relationship Point Range: </color>");
             EditorGUI.LabelField(new Rect(rect.x + 15, rect.y + 140 + height + advancedHeight, 150, 20), content);
             negativeRestriction = EditorGUI.IntField(new Rect(rect.x + 25, rect.y + 160 + height + advancedHeight, rect.width - 170, 15), negativeRestriction);
             content             = new GUIContent("<color=white> <   Points   < </color>");
             EditorGUI.LabelField(new Rect(rect.x + 55, rect.y + 160 + height + advancedHeight, rect.width - 40, 20), content);
             positiveRestriction = EditorGUI.IntField(new Rect(rect.x + 140, rect.y + 160 + height + advancedHeight, rect.width - 170, 15), positiveRestriction);
             content             = new GUIContent("<color=white>Info Restriction</color>");
             EditorGUI.LabelField(new Rect(rect.x + 15, rect.y + 180 + height + advancedHeight, 120, 15), content);
             infoRestriction = EditorGUI.IntField(new Rect(rect.x + 150, rect.y + 180 + height + advancedHeight, rect.width - 170, 15), infoRestriction);
         }
         inPoint.nodeRect  = rect;
         outPoint.nodeRect = rect;
     }
 }