263 lines
5.6 KiB
C#
263 lines
5.6 KiB
C#
//this source code was auto-generated by tolua#, do not modify it
|
|
using System;
|
|
using LuaInterface;
|
|
|
|
public class UnityEngine_PlayerPrefsWrap
|
|
{
|
|
public static void Register(LuaState L)
|
|
{
|
|
L.BeginClass(typeof(UnityEngine.PlayerPrefs), typeof(System.Object));
|
|
L.RegFunction("SetInt", SetInt);
|
|
L.RegFunction("GetInt", GetInt);
|
|
L.RegFunction("SetFloat", SetFloat);
|
|
L.RegFunction("GetFloat", GetFloat);
|
|
L.RegFunction("SetString", SetString);
|
|
L.RegFunction("GetString", GetString);
|
|
L.RegFunction("HasKey", HasKey);
|
|
L.RegFunction("DeleteKey", DeleteKey);
|
|
L.RegFunction("DeleteAll", DeleteAll);
|
|
L.RegFunction("Save", Save);
|
|
L.RegFunction("New", _CreateUnityEngine_PlayerPrefs);
|
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
|
L.EndClass();
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _CreateUnityEngine_PlayerPrefs(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 0)
|
|
{
|
|
UnityEngine.PlayerPrefs obj = new UnityEngine.PlayerPrefs();
|
|
ToLua.PushObject(L, obj);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UnityEngine.PlayerPrefs.New");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int SetInt(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
|
UnityEngine.PlayerPrefs.SetInt(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int GetInt(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 1)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
int o = UnityEngine.PlayerPrefs.GetInt(arg0);
|
|
LuaDLL.lua_pushinteger(L, o);
|
|
return 1;
|
|
}
|
|
else if (count == 2)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
|
|
int o = UnityEngine.PlayerPrefs.GetInt(arg0, arg1);
|
|
LuaDLL.lua_pushinteger(L, o);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.PlayerPrefs.GetInt");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int SetFloat(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
float arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
|
|
UnityEngine.PlayerPrefs.SetFloat(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int GetFloat(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 1)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
float o = UnityEngine.PlayerPrefs.GetFloat(arg0);
|
|
LuaDLL.lua_pushnumber(L, o);
|
|
return 1;
|
|
}
|
|
else if (count == 2)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
float arg1 = (float)LuaDLL.luaL_checknumber(L, 2);
|
|
float o = UnityEngine.PlayerPrefs.GetFloat(arg0, arg1);
|
|
LuaDLL.lua_pushnumber(L, o);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.PlayerPrefs.GetFloat");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int SetString(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 2);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
string arg1 = ToLua.CheckString(L, 2);
|
|
UnityEngine.PlayerPrefs.SetString(arg0, arg1);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int GetString(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
if (count == 1)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
string o = UnityEngine.PlayerPrefs.GetString(arg0);
|
|
LuaDLL.lua_pushstring(L, o);
|
|
return 1;
|
|
}
|
|
else if (count == 2)
|
|
{
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
string arg1 = ToLua.CheckString(L, 2);
|
|
string o = UnityEngine.PlayerPrefs.GetString(arg0, arg1);
|
|
LuaDLL.lua_pushstring(L, o);
|
|
return 1;
|
|
}
|
|
else
|
|
{
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.PlayerPrefs.GetString");
|
|
}
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int HasKey(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
bool o = UnityEngine.PlayerPrefs.HasKey(arg0);
|
|
LuaDLL.lua_pushboolean(L, o);
|
|
return 1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int DeleteKey(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 1);
|
|
string arg0 = ToLua.CheckString(L, 1);
|
|
UnityEngine.PlayerPrefs.DeleteKey(arg0);
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int DeleteAll(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 0);
|
|
UnityEngine.PlayerPrefs.DeleteAll();
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int Save(IntPtr L)
|
|
{
|
|
try
|
|
{
|
|
ToLua.CheckArgsCount(L, 0);
|
|
UnityEngine.PlayerPrefs.Save();
|
|
return 0;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
}
|
|
}
|
|
}
|
|
|