PlayOneShotSound() public method

public PlayOneShotSound ( AudioClip clip ) : void
clip AudioClip
return void
Example #1
0
 static public int PlayOneShotSound(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 2)
         {
             FairyGUI.Stage        self = (FairyGUI.Stage)checkSelf(l);
             UnityEngine.AudioClip a1;
             checkType(l, 2, out a1);
             self.PlayOneShotSound(a1);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 3)
         {
             FairyGUI.Stage        self = (FairyGUI.Stage)checkSelf(l);
             UnityEngine.AudioClip a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             self.PlayOneShotSound(a1, a2);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int PlayOneShotSound(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                FairyGUI.Stage        obj  = (FairyGUI.Stage)ToLua.CheckObject <FairyGUI.Stage>(L, 1);
                UnityEngine.AudioClip arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                obj.PlayOneShotSound(arg0);
                return(0);
            }
            else if (count == 3)
            {
                FairyGUI.Stage        obj  = (FairyGUI.Stage)ToLua.CheckObject <FairyGUI.Stage>(L, 1);
                UnityEngine.AudioClip arg0 = (UnityEngine.AudioClip)ToLua.CheckObject(L, 2, typeof(UnityEngine.AudioClip));
                float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
                obj.PlayOneShotSound(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.Stage.PlayOneShotSound"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }