예제 #1
0
 static void AnimatorOverrideController_clips(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AnimatorOverrideController _this = (UnityEngine.AnimatorOverrideController)vc.csObj;
         var result = _this.clips;
         var arrRet = result;
         for (int i = 0; arrRet != null && i < arrRet.Length; i++)
         {
             JSMgr.datax.setObject((int)JSApi.SetType.SaveAndTempTrace, arrRet[i]);
             JSApi.moveSaveID2Arr(i);
         }
         JSApi.setArrayS((int)JSApi.SetType.Rval, (arrRet != null ? arrRet.Length : 0), true);
     }
     else
     {
         UnityEngine.AnimationClipPair[] arg0 = JSDataExchangeMgr.GetJSArg <UnityEngine.AnimationClipPair[]>(() =>
         {
             int jsObjID = JSApi.getObject((int)JSApi.GetType.Arg);
             int length  = JSApi.getArrayLength(jsObjID);
             var ret     = new UnityEngine.AnimationClipPair[length];
             for (var i = 0; i < length; i++)
             {
                 JSApi.getElement(jsObjID, i);
                 ret[i] = (UnityEngine.AnimationClipPair)JSMgr.datax.getObject((int)JSApi.GetType.SaveAndRemove);
             }
             return(ret);
         });
         UnityEngine.AnimatorOverrideController _this = (UnityEngine.AnimatorOverrideController)vc.csObj;
         _this.clips = arg0;
     }
 }
 static public int constructor(IntPtr l)
 {
     UnityEngine.AnimationClipPair o;
     o = new UnityEngine.AnimationClipPair();
     pushObject(l, o);
     return(1);
 }
예제 #3
0
 static public int set_overrideClip(IntPtr l)
 {
     UnityEngine.AnimationClipPair o = (UnityEngine.AnimationClipPair)checkSelf(l);
     UnityEngine.AnimationClip     v;
     checkType(l, 2, out v);
     o.overrideClip = v;
     return(0);
 }
예제 #4
0
 static public int get_overrideClip(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair self = (UnityEngine.AnimationClipPair)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.overrideClip);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #5
0
 static public int get_overrideClip(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair self = (UnityEngine.AnimationClipPair)checkSelf(l);
         pushValue(l, self.overrideClip);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.AnimationClipPair o;
			o=new UnityEngine.AnimationClipPair();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair o;
         o=new UnityEngine.AnimationClipPair();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
예제 #8
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair o;
         o = new UnityEngine.AnimationClipPair();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
예제 #9
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair o;
         o = new UnityEngine.AnimationClipPair();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #10
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.AnimationClipPair o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.AnimationClipPair();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
예제 #11
0
 static public int set_overrideClip(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair self = (UnityEngine.AnimationClipPair)checkSelf(l);
         UnityEngine.AnimationClip     v;
         checkType(l, 2, out v);
         self.overrideClip = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
예제 #12
0
 static public int set_overrideClip(IntPtr l)
 {
     try {
         UnityEngine.AnimationClipPair self = (UnityEngine.AnimationClipPair)checkSelf(l);
         UnityEngine.AnimationClip     v;
         checkType(l, 2, out v);
         self.overrideClip = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #13
0
 static void AnimationClipPair_overrideClip(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AnimationClipPair _this = (UnityEngine.AnimationClipPair)vc.csObj;
         var result = _this.overrideClip;
         JSMgr.datax.setObject((int)JSApi.SetType.Rval, result);
     }
     else
     {
         UnityEngine.AnimationClip     arg0  = (UnityEngine.AnimationClip)JSMgr.datax.getObject((int)JSApi.GetType.Arg);
         UnityEngine.AnimationClipPair _this = (UnityEngine.AnimationClipPair)vc.csObj;
         _this.overrideClip = arg0;
     }
 }
    AnimatorOverrideController createAnimatorController(params AnimationClip[] clips)
    {
        AnimationClipPair[] pairs = new AnimationClipPair[orgcontroller.animationClips.Length];
        for (int i = 0; i < pairs.Length; i++) {
            pairs[i] = new AnimationClipPair {
                originalClip = orgcontroller.animationClips[i],
                overrideClip = clips[i]
            };
        }

        AnimatorOverrideController ret = new AnimatorOverrideController();
        ret.name = "TheTestController";
        ret.runtimeAnimatorController = orgcontroller;
        ret.clips = pairs;

        return ret;
    }
    static int _CreateAnimationClipPair(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            AnimationClipPair obj = new AnimationClipPair();
            LuaScriptMgr.PushObject(L, obj);
            return 1;
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: AnimationClipPair.New");
        }

        return 0;
    }
 void ShowAnimatorOverrideControllerClips(AnimationClipPair[] clips)
 {
     //for (int pos = 0; pos < clips.Length; pos++)
     //{
     //    EditorGUILayout.BeginHorizontal();
     //    CreateLabel(clips[pos].originalClip.name);
     //    CreateLabel(clips[pos].overrideClip.averageDuration.ToString());
     //    CreateLabel(clips[pos].overrideClip.isLooping.ToString());
     //    EditorGUILayout.EndHorizontal();
     //}
 }
예제 #17
0
 static public int get_overrideClip(IntPtr l)
 {
     UnityEngine.AnimationClipPair o = (UnityEngine.AnimationClipPair)checkSelf(l);
     pushValue(l, o.overrideClip);
     return(1);
 }