Ejemplo n.º 1
0
 public void Drag(float value)
 {
     v  += value;
     p   = rect.localPosition;
     p.x = parent.GetPosition(v).x;
     p.y = parent.GetPosition(v).y;
     rect.localPosition = p;
 }
Ejemplo n.º 2
0
 static int GetPosition(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ScrollViewLoop      obj  = (ScrollViewLoop)ToLua.CheckObject(L, 1, typeof(ScrollViewLoop));
         float               arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Vector2 o    = obj.GetPosition(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }