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

            if (count == 2 && TypeChecker.CheckTypes(L, typeof(Logic.Audio.Controller.AudioController), typeof(UnityEngine.AudioSource)))
            {
                Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.ToObject(L, 1);
                UnityEngine.AudioSource arg0 = (UnityEngine.AudioSource)ToLua.ToObject(L, 2);
                obj.StopAudio(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, typeof(Logic.Audio.Controller.AudioController), typeof(string)))
            {
                Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.StopAudio(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Logic.Audio.Controller.AudioController.StopAudio"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #2
0
    static int PlayBGMusic(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2 && TypeChecker.CheckTypes(L, typeof(Logic.Audio.Controller.AudioController), typeof(string)))
            {
                Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.ToObject(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                obj.PlayBGMusic(arg0);
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes(L, typeof(Logic.Audio.Controller.AudioController), typeof(Logic.Enums.FightType)))
            {
                Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.ToObject(L, 1);
                Logic.Enums.FightType arg0 = (Logic.Enums.FightType)ToLua.ToObject(L, 2);
                obj.PlayBGMusic(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Logic.Audio.Controller.AudioController.PlayBGMusic"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
Beispiel #3
0
 static int SavePlayerPref(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.CheckObject(L, 1, typeof(Logic.Audio.Controller.AudioController));
         obj.SavePlayerPref();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #4
0
 static int SetBGMusicState(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.CheckObject(L, 1, typeof(Logic.Audio.Controller.AudioController));
         bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.SetBGMusicState(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #5
0
 static int PlayAudioRepeat(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)ToLua.CheckObject(L, 1, typeof(Logic.Audio.Controller.AudioController));
         string arg0 = ToLua.CheckString(L, 2);
         float  arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         obj.PlayAudioRepeat(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #6
0
    static int set_isOpenAudio(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.isOpenAudio = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isOpenAudio on a nil value" : e.Message));
        }
    }
Beispiel #7
0
    static int get_isOpenAudio(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            Logic.Audio.Controller.AudioController obj = (Logic.Audio.Controller.AudioController)o;
            bool ret = obj.isOpenAudio;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index isOpenAudio on a nil value" : e.Message));
        }
    }