예제 #1
0
        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);
        }
예제 #2
0
        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
            });
        }
예제 #3
0
        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;
        }
예제 #4
0
 CurveWrapperW getCurveWrapperById(int i)
 {
     CurveWrapperW crv = new CurveWrapperW ();
                 crv.wrapped = MethodInfo_getCurveWrapperById.Invoke (__instance, new object[]{i});
                 return crv;
 }
예제 #5
0
        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;
        }