Lerp() private method

private Lerp ( Material start, Material end, float t ) : void
start Material
end Material
t float
return void
 IEnumerator MaterialLerp(Material material,float time)
 {
     float moveTime = 0.0f;
     while(moveTime < time){
         moveTime += Time.deltaTime;
         material.Lerp(material1, material2, moveTime/time);
         yield return null;
     }
 }
 static int Lerp(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         UnityEngine.Material obj  = (UnityEngine.Material)ToLua.CheckObject(L, 1, typeof(UnityEngine.Material));
         UnityEngine.Material arg0 = (UnityEngine.Material)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.Material));
         UnityEngine.Material arg1 = (UnityEngine.Material)ToLua.CheckUnityObject(L, 3, typeof(UnityEngine.Material));
         float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
         obj.Lerp(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#3
0
 static public int Lerp(IntPtr l)
 {
     try {
         UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
         UnityEngine.Material a1;
         checkType(l, 2, out a1);
         UnityEngine.Material a2;
         checkType(l, 3, out a2);
         System.Single a3;
         checkType(l, 4, out a3);
         self.Lerp(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#4
0
 static public int Lerp(IntPtr l)
 {
     try {
         UnityEngine.Material self = (UnityEngine.Material)checkSelf(l);
         UnityEngine.Material a1;
         checkType(l, 2, out a1);
         UnityEngine.Material a2;
         checkType(l, 3, out a2);
         System.Single a3;
         checkType(l, 4, out a3);
         self.Lerp(a1, a2, a3);
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }