Пример #1
0
    static int Log(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes(L, 1, typeof(string)))
            {
                string arg0 = ToLua.ToString(L, 1);
                LGYLOG.Log(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, 1, typeof(string), typeof(int)))
            {
                string arg0 = ToLua.ToString(L, 1);
                int    arg1 = (int)LuaDLL.lua_tonumber(L, 2);
                LGYLOG.Log(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LGYLOG.Log"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #2
0
    static int _CreateLGYLOG(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                LGYLOG obj = new LGYLOG();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: LGYLOG.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Пример #3
0
 public void PrintArray(Vector3[] va)
 {
     LGYLOG.Log(va[0].x + "=====1");
     LGYLOG.Log(va[1].y + "=====2");
     LGYLOG.Log(va[2].z + "=====3");
 }