Esempio n. 1
0
 public DSConnection(DSConnectionPoint inPoint, DSConnectionPoint outPoint, DataSimulator ds)
 {
     this.ds          = ds;
     this.inPoint     = inPoint;
     this.outPoint    = outPoint;
     removeButtonRect = new Rect(0f, 0f, 20f, 20f);
 }
Esempio n. 2
0
 public DSSetValueNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds)
 {
     rect     = new Rect(position.x, position.y, 250, 110);
     title    = "Set Value";
     nodeType = DSNodeType.SetValue;
     inPoint  = new DSConnectionPoint(id, DSConnectionPointType.In, ds);
     outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds);
 }
Esempio n. 3
0
 public DSIntToFloatNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds)
 {
     rect     = new Rect(position.x, position.y, 250, 80);
     title    = "Int. to Float";
     nodeType = DSNodeType.IntToFloat;
     inPoint  = new DSConnectionPoint(id, DSConnectionPointType.In, ds);
     outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds);
 }
Esempio n. 4
0
 public DSFloatCalNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds)
 {
     rect     = new Rect(position.x, position.y, 250, 140);
     title    = "Float Calculation";
     nodeType = DSNodeType.FloatCal;
     inPoint  = new DSConnectionPoint(id, DSConnectionPointType.In, ds);
     outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds);
 }
Esempio n. 5
0
 public DSOutputNode(int id, Vector2 position, DataSimulator ds) : base(id, position, ds)
 {
     dataList = new List <DSOutputData> ();
     rect     = new Rect(position.x, position.y, 250f, 80f);
     title    = "Output";
     nodeType = DSNodeType.Output;
     inPoint  = new DSConnectionPoint(id, DSConnectionPointType.In, ds);
     outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds);
 }
Esempio n. 6
0
 public DSNode(int id, Vector2 position, DataSimulator ds)
 {
     this.ds  = ds;
     this.id  = id;
     rect     = new Rect(position.x, position.y, 50, 25);
     title    = "Start";
     nodeType = DSNodeType.Start;
     outPoint = new DSConnectionPoint(id, DSConnectionPointType.Out, ds);
 }
Esempio n. 7
0
 public DSSelectionNode(int id, Vector2 position, DataSimulator ds)
 {
     this.id         = id;
     this.ds         = ds;
     isSelectionNode = true;
     inPoint         = new DSConnectionPoint(id, DSConnectionPointType.In, ds);
     trueOutPoint    = new DSConnectionPoint(id, DSConnectionPointType.TrueOut, ds);
     falseOutPoint   = new DSConnectionPoint(id, DSConnectionPointType.FalseOut, ds);
 }
Esempio n. 8
0
        public void load(string save)
        {
            string[] splited             = save.Split(DataSimulator.DS_SAVELOAD_SEPERATOR);
            DSConnectionPointType inType = (DSConnectionPointType)int.Parse(splited [0]);
            DSNode inNode = ds.nodes.Find(x => x.id == int.Parse(splited [1]));
            DSConnectionPointType outType = (DSConnectionPointType)int.Parse(splited [2]);
            DSNode outNode = ds.nodes.Find(x => x.id == int.Parse(splited [3]));

            switch (inType)
            {
            case DSConnectionPointType.In:
                inPoint = inNode.inPoint;
                break;

            default:
                break;
            }

            switch (outType)
            {
            case DSConnectionPointType.Out:
                outPoint = outNode.outPoint;
                break;

            case DSConnectionPointType.TrueOut:
                outPoint = ((DSSelectionNode)outNode).trueOutPoint;
                break;

            case DSConnectionPointType.FalseOut:
                outPoint = ((DSSelectionNode)outNode).falseOutPoint;
                break;

            default:
                break;
            }
        }