Beispiel #1
0
 public void Refresh()
 {
     transform.localPosition = warpContent.getLocalPositionByIndex(index);
     gameObject.name         = index.ToString();
     if (warpContent.onInitializeItem != null && index >= 0)
     {
         warpContent.onInitializeItem(gameObject, index + 1);//匹配LUA索引从1开始,index+1
     }
 }
Beispiel #2
0
 static int getLocalPositionByIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UIWarpContent       obj  = (UIWarpContent)ToLua.CheckObject(L, 1, typeof(UIWarpContent));
         int                 arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         UnityEngine.Vector3 o    = obj.getLocalPositionByIndex(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }