Ejemplo n.º 1
0
    static int Init(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(ReusingScrollRect), typeof(string)))
            {
                ReusingScrollRect obj  = (ReusingScrollRect)ToLua.ToObject(L, 1);
                string            arg0 = ToLua.ToString(L, 2);
                obj.Init(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes(L, 1, typeof(ReusingScrollRect), typeof(string), typeof(string)))
            {
                ReusingScrollRect obj  = (ReusingScrollRect)ToLua.ToObject(L, 1);
                string            arg0 = ToLua.ToString(L, 2);
                string            arg1 = ToLua.ToString(L, 3);
                obj.Init(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: ReusingScrollRect.Init"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    public override void OnInspectorGUI()
    {
        m_rsr = (ReusingScrollRect)target;

        m_rsr.m_isInversion = EditorGUILayout.Toggle("IsInversion: ", m_rsr.m_isInversion);

        base.OnInspectorGUI();
    }
    public override void OnInspectorGUI()
    {
        m_rsr = (ReusingScrollRect)target;

        m_rsr.m_isInversion = EditorGUILayout.Toggle("IsInversion: ", m_rsr.m_isInversion);

        base.OnInspectorGUI();
    }
Ejemplo n.º 4
0
    //UI的初始化请放在这里
    public override void OnOpen()
    {
        m_ShopItem = GetReusingScrollRect("Items");

        m_ShopItem.Init(UIEventKey, "ShopWindow_Item");

        m_ShopItem.SetData(GetShopData());

        AddOnClickListener("Button_Close", OnClickCLose);
    }
Ejemplo n.º 5
0
    public ReusingScrollRect GetReusingScrollRect(string name)
    {
        if (m_reusingScrollRects.ContainsKey(name))
        {
            return(m_reusingScrollRects[name]);
        }

        ReusingScrollRect tmp = GetGameObject(name).GetComponent <ReusingScrollRect>();

        m_reusingScrollRects.Add(name, tmp);
        return(tmp);
    }
Ejemplo n.º 6
0
 static int Dispose(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         ReusingScrollRect obj = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         obj.Dispose();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 7
0
 static int Rebuild(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ReusingScrollRect           obj  = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         UnityEngine.UI.CanvasUpdate arg0 = (UnityEngine.UI.CanvasUpdate)ToLua.CheckObject(L, 2, typeof(UnityEngine.UI.CanvasUpdate));
         obj.Rebuild(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 8
0
 static int SetPos(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ReusingScrollRect   obj  = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)ToLua.CheckObject(L, 2, typeof(UnityEngine.Vector3));
         obj.SetPos(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 9
0
 static int ExitAnim(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         ReusingScrollRect obj            = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         System.Collections.IEnumerator o = obj.ExitAnim();
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 10
0
 static int SetItem(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ReusingScrollRect obj  = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         string            arg0 = ToLua.CheckString(L, 2);
         obj.SetItem(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 11
0
 static int SetData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ReusingScrollRect obj = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         System.Collections.Generic.List <System.Collections.Generic.Dictionary <string, object> > arg0 = (System.Collections.Generic.List <System.Collections.Generic.Dictionary <string, object> >)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <System.Collections.Generic.Dictionary <string, object> >));
         obj.SetData(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 12
0
 static int GetItem(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ReusingScrollRect obj = (ReusingScrollRect)ToLua.CheckObject(L, 1, typeof(ReusingScrollRect));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         ReusingScrollItemBase o = obj.GetItem(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 13
0
 static int GetReusingScrollRect(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UIBase            obj  = (UIBase)ToLua.CheckObject(L, 1, typeof(UIBase));
         string            arg0 = ToLua.CheckString(L, 2);
         ReusingScrollRect o    = obj.GetReusingScrollRect(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 14
0
    static int get_m_isReceiveControl(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj = (ReusingScrollRect)o;
            bool ret = obj.m_isReceiveControl;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_isReceiveControl on a nil value" : e.Message));
        }
    }
Ejemplo n.º 15
0
    public ReusingScrollRect GetReusingScrollRect(string name)
    {
        if (m_reusingScrollRects.ContainsKey(name))
        {
            return(m_reusingScrollRects[name]);
        }

        ReusingScrollRect tmp = GetGameObject(name).GetComponent <ReusingScrollRect>();

        if (tmp == null)
        {
            throw new Exception(m_EventNames + " GetReusingScrollRect ->" + name + "<- is Null !");
        }

        m_reusingScrollRects.Add(name, tmp);
        return(tmp);
    }
Ejemplo n.º 16
0
    static int set_m_itemSize(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect   obj  = (ReusingScrollRect)o;
            UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)ToLua.CheckObject(L, 2, typeof(UnityEngine.Vector3));
            obj.m_itemSize = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_itemSize on a nil value" : e.Message));
        }
    }
Ejemplo n.º 17
0
    static int set_m_itemCatchs(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj = (ReusingScrollRect)o;
            System.Collections.Generic.List <ReusingScrollItemBase> arg0 = (System.Collections.Generic.List <ReusingScrollItemBase>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <ReusingScrollItemBase>));
            obj.m_itemCatchs = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_itemCatchs on a nil value" : e.Message));
        }
    }
Ejemplo n.º 18
0
    static int set_m_isReceiveControl(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj = (ReusingScrollRect)o;
            bool arg0             = LuaDLL.luaL_checkboolean(L, 2);
            obj.m_isReceiveControl = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_isReceiveControl on a nil value" : e.Message));
        }
    }
Ejemplo n.º 19
0
    static int set_m_ItemName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj  = (ReusingScrollRect)o;
            string            arg0 = ToLua.CheckString(L, 2);
            obj.m_ItemName = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_ItemName on a nil value" : e.Message));
        }
    }
Ejemplo n.º 20
0
    static int get_m_itemCatchs(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj = (ReusingScrollRect)o;
            System.Collections.Generic.List <ReusingScrollItemBase> ret = obj.m_itemCatchs;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_itemCatchs on a nil value" : e.Message));
        }
    }
Ejemplo n.º 21
0
    static int get_m_itemSize(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect   obj = (ReusingScrollRect)o;
            UnityEngine.Vector3 ret = obj.m_itemSize;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_itemSize on a nil value" : e.Message));
        }
    }
Ejemplo n.º 22
0
    static int get_m_ItemName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            ReusingScrollRect obj = (ReusingScrollRect)o;
            string            ret = obj.m_ItemName;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index m_ItemName on a nil value" : e.Message));
        }
    }