Example #1
0
    static int PlaySound(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                string arg1 = ToLua.CheckString(L, 3);
                obj.PlaySound(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                string arg0 = ToLua.CheckString(L, 2);
                string arg1 = ToLua.CheckString(L, 3);
                float  arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
                obj.PlaySound(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.SoundManager.PlaySound"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int PlaySound(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
         string arg0 = ToLua.CheckString(L, 2);
         obj.PlaySound(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Example #3
0
    static int PlaySound(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                obj.PlaySound(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <float>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                obj.PlaySound(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <LuaFramework.SoundManager.SoundType>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                LuaFramework.SoundManager.SoundType arg1 = (LuaFramework.SoundManager.SoundType)ToLua.ToObject(L, 3);
                obj.PlaySound(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <LuaFramework.SoundManager.SoundType, float>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                LuaFramework.SoundManager.SoundType arg1 = (LuaFramework.SoundManager.SoundType)ToLua.ToObject(L, 3);
                float arg2 = (float)LuaDLL.lua_tonumber(L, 4);
                obj.PlaySound(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <float, bool>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                bool   arg2 = LuaDLL.lua_toboolean(L, 4);
                obj.PlaySound(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <float, float>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                float  arg2 = (float)LuaDLL.lua_tonumber(L, 4);
                obj.PlaySound(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes <float, float, bool>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                float  arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                float  arg2 = (float)LuaDLL.lua_tonumber(L, 4);
                bool   arg3 = LuaDLL.lua_toboolean(L, 5);
                obj.PlaySound(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 5 && TypeChecker.CheckTypes <LuaFramework.SoundManager.SoundType, float, float>(L, 3))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                LuaFramework.SoundManager.SoundType arg1 = (LuaFramework.SoundManager.SoundType)ToLua.ToObject(L, 3);
                float arg2 = (float)LuaDLL.lua_tonumber(L, 4);
                float arg3 = (float)LuaDLL.lua_tonumber(L, 5);
                obj.PlaySound(arg0, arg1, arg2, arg3);
                return(0);
            }
            else if (count == 6)
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
                string arg0 = ToLua.CheckString(L, 2);
                LuaFramework.SoundManager.SoundType arg1 = (LuaFramework.SoundManager.SoundType)ToLua.CheckObject(L, 3, typeof(LuaFramework.SoundManager.SoundType));
                float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
                float arg3 = (float)LuaDLL.luaL_checknumber(L, 5);
                bool  arg4 = LuaDLL.luaL_checkboolean(L, 6);
                obj.PlaySound(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.SoundManager.PlaySound"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }