Exemple #1
0
 protected void OnChoice(ChoiceEventArgs args)
 {
     if (Choice != null)
     {
         Choice(this, args);
     }
 }
Exemple #2
0
 public Dialogue(int _id, string _text, Choice[] _choices = null, ChoiceEventArgs _CEA = null, string b = null, string db = null)
 {
     iD = _id;
     text = _text;
     choices = _choices;
     setbool = b;
     setDayBool = db;
     if (_CEA != null)
     {
         CEA = _CEA;
         Action += _CEA.ChoiceAction;
     }
 }
Exemple #3
0
 public Choice(string _option, ChoiceEventArgs _CEA = null, string setb = null, string checkb = null, string removeItem = null, string[] tutorialContinue = null, string checki = null, string setdb = null)
 {
     option = _option;
     if (_CEA != null)
     {
         Action += _CEA.ChoiceAction;
         CEA = _CEA;
     }
     setbool = setb;
     setDayBool = setdb;
     checkbool = checkb;
     checkitem = checki;
     removeitem = removeItem;
     tutorialcontinue = tutorialContinue;
 }
Exemple #4
0
        private void Parent_ChoiceEvent(ChoiceEventArgs cea)
        {
            this.action = cea.Choice;

            switch (cea.Choice)
            {
            case Components.width:
                thickness = thickness == cea.Thickness ? thickness : cea.Thickness;

                if (pen == null)
                {
                    pen = new Pen(color, thickness);
                }
                else
                {
                    pen.Width = cea.Thickness;
                }
                break;

            case Components.color:
                color = color == cea.ColorP ? color : cea.ColorP;

                if (pen == null)
                {
                    pen = new Pen(color, thickness);
                }
                else
                {
                    pen.Color = cea.ColorP;
                }
                break;

            case Components.fill:
                Shape.IsFill = !Shape.IsFill;
                break;
            }
        }
 public void ConvertChoiceEventArgs(ChoiceEventArgs CEA)
 {
     ChoiceAction = CEA.ChoiceAction;
     Testing = CEA.Testing;
     ShoveX = CEA.ShoveX;
     IDNum = CEA.IDNum;
     DialogueID = CEA.DialogueID;
     String = CEA.String;
     TutorialDialogues = CEA.TutorialDialogues;
     TutorialDialogueCounter = CEA.TutorialDialogueCounter;
     CoroutineName = CEA.CoroutineName;
     DestroyItem = CEA.DestroyItem;
 }
 private ChoiceEventArgs TutorialItem(int id, bool removeInteractable = true)
 {
     ChoiceEventArgs CEA = new ChoiceEventArgs() { ChoiceAction = InteractableObject.InteractItem, IDNum = id, DestroyItem = removeInteractable };
     return CEA;
 }