コード例 #1
0
 static int Play(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject(L, 1, typeof(LuaFramework.SoundManager));
         UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.CheckUnityObject(L, 2, typeof(UnityEngine.AudioClip));
         UnityEngine.Vector3       arg1 = ToLua.ToVector3(L, 3);
         obj.Play(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #2
0
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes <string>(L, 2))
            {
                LuaFramework.SoundManager obj = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.AudioClip>(L, 2))
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.ToObject(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <UnityEngine.Vector3>(L, 3))
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                UnityEngine.Vector3       arg1 = ToLua.ToVector3(L, 3);
                obj.Play(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <float>(L, 3))
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                float arg1 = (float)LuaDLL.lua_tonumber(L, 3);
                obj.Play(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.SoundManager.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #3
0
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                obj.Play(arg0, arg1);
                return(0);
            }
            else if (count == 4)
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioClip     arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
                obj.Play(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 5)
            {
                LuaFramework.SoundManager obj  = (LuaFramework.SoundManager)ToLua.CheckObject <LuaFramework.SoundManager>(L, 1);
                UnityEngine.AudioSource   arg0 = (UnityEngine.AudioSource)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioSource));
                UnityEngine.AudioClip     arg1 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 3, typeof(UnityEngine.AudioClip));
                float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
                float arg3 = (float)LuaDLL.luaL_checknumber(L, 5);
                obj.Play(arg0, arg1, arg2, arg3);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: LuaFramework.SoundManager.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }