public void AddCurve(CurveWrapperW curveWrapperW) { int len = _curveWrappersW.Length; curveWrapperW.id = ("Curve" + len).GetHashCode (); Array.Resize (ref _curveWrappersW, len + 1); _curveWrappersW [len] = curveWrapperW; PropertyInfo_animationCurves.SetValue (__instance, CurveWrappersWToCurveWrappers (_curveWrappersW), null); }
public CurveEditorW(Rect rect, CurveWrapperW[] curveWrappers, bool minimalGUI) { InitType (); if (CurveEditorW.ms_Styles == null) { CurveEditorW.ms_Styles = new CurveEditorW.Styles (); } __instance = method_ctor.Invoke (new object[] { rect, CurveWrappersWToCurveWrappers (curveWrappers), minimalGUI }); }
Array CurveWrappersWToCurveWrappers(CurveWrapperW[] curveWrappers) { Array curveWrapperArray = Array.CreateInstance (CurveWrapperW.GetWrappedType (), curveWrappers.Length); CurveWrapperW curveWrapperW; for (int i=0; i<curveWrapperArray.Length; i++) { curveWrapperW = curveWrappers [i]; curveWrapperW.id = ("Curve" + i).GetHashCode (); curveWrapperArray.SetValue (curveWrapperW.wrapped, i); } _curveWrappersW = curveWrappers; return curveWrapperArray; }
CurveWrapperW getCurveWrapperById(int i) { CurveWrapperW crv = new CurveWrapperW (); crv.wrapped = MethodInfo_getCurveWrapperById.Invoke (__instance, new object[]{i}); return crv; }
Array AnimationCurvesToCurveWrappers(AnimationCurve[] curves) { CurveWrapperW curveWrapperW; Array curveWrapperArray = Array.CreateInstance (CurveWrapperW.GetWrappedType (), curves.Length); _curveWrappersW = new CurveWrapperW[curves.Length]; AnimationCurve curve; for (int i=0; i<curves.Length; i++) { curve = curves [i]; _curveWrappersW [i] = curveWrapperW = new CurveWrapperW (); curveWrapperW.id = ("Curve" + i).GetHashCode (); curveWrapperW.curve = curve; curveWrapperArray.SetValue (curveWrapperW.wrapped, i); } return curveWrapperArray; }