Example #1
0
 public Point(int index, double price, int barIndex, SidePoint currentSideSwing)
 {
     Index            = index;
     Price            = price;
     BarIndex         = barIndex;
     CurrentSideSwing = currentSideSwing;
 }
Example #2
0
File: Barier.cs Project: s76/testAI
    void Awake()
    {
        var l = transform.GetComponentsInChildren<SidePointEditor> ();
        side_points = new SidePoint[l.Length];
        for (int i = 0; i < side_points.Length; i ++) {
            var sp = new SidePoint();
            sp.value = l[i].transform.position;
            sp.closest_conner_points = new Vector3[l[i].closest_conner_points.Length];
            for(int j = 0 ; j < l[i].closest_conner_points.Length; j ++ ) {
                sp.closest_conner_points[j] = l[i].closest_conner_points[j].transform.position;
            }
            side_points[i] = sp;
        }

        var m = transform.GetComponentsInChildren<Transform> ();
        foreach (var _m in m) {
            if ( _m == transform ) continue;
            DestroyObject(_m.gameObject);
        }
        _side_points = null;
    }