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++; }
public XCurve(int len, CurveBind <T> cb) { length = len; this.bind = cb.key; frames = new XFrame <T> [len]; }
public XCurve(int len, string bind) { length = len; this.bind = bind; frames = new XFrame <T> [len]; }