Exemple #1
0
    static int PlayBackSound(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.PlayBackSound(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.PlayBackSound(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.SoundManager.PlayBackSound"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
 static int PlayBackSound(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.PlayBackSound(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemple #3
0
 static int PlayBackSound(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 4);
         LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
         UnityEngine.AudioSource   arg0 = (UnityEngine.AudioSource)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.AudioSource));
         string arg1 = ToLua.CheckString(L, 3);
         string arg2 = ToLua.CheckString(L, 4);
         obj.PlayBackSound(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }