Example #1
0
        public void AddKey(float time, T v, int idx)
        {
            var n = new XFrame <T> [length + 1];

            for (int i = 0; i <= length; i++)
            {
                if (i < idx)
                {
                    n[i] = frames[i];
                }
                else if (i == idx)
                {
                    n[i] = new XFrame <T>(time, v);
                }
                else
                {
                    n[i] = frames[i - 1];
                }
            }
            frames = n;
            length++;
        }
Example #2
0
 public XCurve(int len, CurveBind <T> cb)
 {
     length    = len;
     this.bind = cb.key;
     frames    = new XFrame <T> [len];
 }
Example #3
0
 public XCurve(int len, string bind)
 {
     length    = len;
     this.bind = bind;
     frames    = new XFrame <T> [len];
 }