Example #1
0
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Animations.ConstraintSource o;
         o = new UnityEngine.Animations.ConstraintSource();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #2
0
 private void SetCameraToCar(GameObject car)
 {
     UnityEngine.Animations.ConstraintSource cs = new UnityEngine.Animations.ConstraintSource();
     cs.sourceTransform = car.transform;
     cs.weight          = 1;
     car.GetComponent <CarController>().mainCamera = chaseCamera;
     chaseCamera.gameObject.GetComponent <LookAtConstraint>().SetSource(0, cs);
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Animations.ConstraintSource o;
         o = new UnityEngine.Animations.ConstraintSource();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int GetSource(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.Animations.LookAtConstraint obj = (UnityEngine.Animations.LookAtConstraint)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animations.LookAtConstraint));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Animations.ConstraintSource o = obj.GetSource(arg0);
         ToLua.PushValue(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int AddSource(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Animations.LookAtConstraint obj  = (UnityEngine.Animations.LookAtConstraint)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animations.LookAtConstraint));
            UnityEngine.Animations.ConstraintSource arg0 = StackTraits <UnityEngine.Animations.ConstraintSource> .Check(L, 2);

            int o = obj.AddSource(arg0);
            LuaDLL.lua_pushinteger(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int SetSource(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            UnityEngine.Animations.LookAtConstraint obj = (UnityEngine.Animations.LookAtConstraint)ToLua.CheckObject(L, 1, typeof(UnityEngine.Animations.LookAtConstraint));
            int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            UnityEngine.Animations.ConstraintSource arg1 = StackTraits <UnityEngine.Animations.ConstraintSource> .Check(L, 3);

            obj.SetSource(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Example #7
0
 private extern void SetSourceInternal(int index, ConstraintSource source);
Example #8
0
 public void SetSource(int index, ConstraintSource source)
 {
     ValidateSourceIndex(index);
     SetSourceInternal(index, source);
 }
Example #9
0
 public extern int AddSource(ConstraintSource source);
Example #10
0
 private extern void SetSourceInternal_Injected(int index, ref ConstraintSource source);
Example #11
0
 private extern void GetSourceInternal_Injected(int index, out ConstraintSource ret);
Example #12
0
 private extern int AddSource_Injected(ref ConstraintSource source);
Example #13
0
 private void SetSourceInternal(int index, ConstraintSource source)
 {
     this.SetSourceInternal_Injected(index, ref source);
 }
Example #14
0
 public int AddSource(ConstraintSource source)
 {
     return(this.AddSource_Injected(ref source));
 }