Example #1
0
    static int get_RectTransform(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase            obj = (SimpleItemBase)o;
            UnityEngine.RectTransform ret = obj.RectTransform;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index RectTransform on a nil value"));
        }
    }
Example #2
0
    static int get_index(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj = (SimpleItemBase)o;
            int            ret = obj.index;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index index on a nil value"));
        }
    }
Example #3
0
    static int get_itemName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj = (SimpleItemBase)o;
            string         ret = obj.itemName;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index itemName on a nil value"));
        }
    }
Example #4
0
    static int get_data(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj = (SimpleItemBase)o;
            object         ret = obj.data;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index data on a nil value"));
        }
    }
Example #5
0
    static int set_itemName(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj  = (SimpleItemBase)o;
            string         arg0 = ToLua.CheckString(L, 2);
            obj.itemName = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index itemName on a nil value"));
        }
    }
Example #6
0
    static int set_index(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj  = (SimpleItemBase)o;
            int            arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.index = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index index on a nil value"));
        }
    }
Example #7
0
    static int set_data(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            SimpleItemBase obj  = (SimpleItemBase)o;
            object         arg0 = ToLua.ToVarObject(L, 2);
            obj.data = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index data on a nil value"));
        }
    }
Example #8
0
    //创建item
    private void CreateItem(int index, Vector3 position)
    {
        SimpleItemBase item     = (Instantiate(this.ItemPrefab) as GameObject).GetComponent <SimpleItemBase>();
        string         itemName = null;

        item.gameObject.SetActive(true);
        item.index    = index;
        item.data     = this.dataList[index];
        itemName      = "item" + index;
        item.itemName = itemName;

        item.gameObject.name = itemName;
        item.gameObject.transform.SetParent(this.ItemContent, false);
        item.gameObject.transform.GetComponent <RectTransform>().anchoredPosition3D = position;

        this.itemList.Add(item);
    }
Example #9
0
    static int QPYX_get_RectTransform_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            UnityEngine.RectTransform QPYX_ret_YXQP = QPYX_obj_YXQP.RectTransform;
            ToLua.PushSealed(L_YXQP, QPYX_ret_YXQP);
            return(1);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index RectTransform on a nil value"));
        }
    }
Example #10
0
    static int QPYX_get_itemName_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            string QPYX_ret_YXQP = QPYX_obj_YXQP.itemName;
            LuaDLL.lua_pushstring(L_YXQP, QPYX_ret_YXQP);
            return(1);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index itemName on a nil value"));
        }
    }
Example #11
0
    static int QPYX_get_data_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            object QPYX_ret_YXQP = QPYX_obj_YXQP.data;
            ToLua.Push(L_YXQP, QPYX_ret_YXQP);
            return(1);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index data on a nil value"));
        }
    }
Example #12
0
    static int QPYX_set_itemName_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 2);
            QPYX_obj_YXQP.itemName = QPYX_arg0_YXQP;
            return(0);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index itemName on a nil value"));
        }
    }
Example #13
0
    static int QPYX_set_index_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            int QPYX_arg0_YXQP = (int)LuaDLL.luaL_checknumber(L_YXQP, 2);
            QPYX_obj_YXQP.index = QPYX_arg0_YXQP;
            return(0);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index index on a nil value"));
        }
    }
Example #14
0
    static int QPYX_get_CellHeight_YXQP(IntPtr L_YXQP)
    {
        object QPYX_o_YXQP = null;

        try
        {
            QPYX_o_YXQP = ToLua.ToObject(L_YXQP, 1);                        SimpleItemBase QPYX_obj_YXQP = (SimpleItemBase)QPYX_o_YXQP;
            int QPYX_ret_YXQP = QPYX_obj_YXQP.CellHeight;
            LuaDLL.lua_pushinteger(L_YXQP, QPYX_ret_YXQP);
            return(1);
        }
        catch (Exception QPYX_e_YXQP)            {
            return(LuaDLL.toluaL_exception(L_YXQP, QPYX_e_YXQP, QPYX_o_YXQP, "attempt to index CellHeight on a nil value"));
        }
    }