| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- //this source code was auto-generated by tolua#, do not modify it
- using System;
- using LuaInterface;
- public class BattleEndConditionWrap
- {
- public static void Register(LuaState L)
- {
- L.BeginClass(typeof(BattleEndCondition), typeof(System.Object));
- L.RegFunction("New", _CreateBattleEndCondition);
- L.RegFunction("__tostring", ToLua.op_ToString);
- L.RegVar("endType", get_endType, set_endType);
- L.RegVar("endVal", get_endVal, set_endVal);
- L.RegVar("resultType", get_resultType, set_resultType);
- L.RegVar("win", get_win, set_win);
- L.EndClass();
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int _CreateBattleEndCondition(IntPtr L)
- {
- try
- {
- int count = LuaDLL.lua_gettop(L);
- if (count == 0)
- {
- BattleEndCondition obj = new BattleEndCondition();
- ToLua.PushObject(L, obj);
- return 1;
- }
- else if (count == 2)
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- BattleEndCondition obj = new BattleEndCondition(arg0, arg1);
- ToLua.PushObject(L, obj);
- return 1;
- }
- else if (count == 4)
- {
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
- int arg1 = (int)LuaDLL.luaL_checknumber(L, 2);
- int arg2 = (int)LuaDLL.luaL_checknumber(L, 3);
- bool arg3 = LuaDLL.luaL_checkboolean(L, 4);
- BattleEndCondition obj = new BattleEndCondition(arg0, arg1, arg2, arg3);
- ToLua.PushObject(L, obj);
- return 1;
- }
- else
- {
- return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: BattleEndCondition.New");
- }
- }
- catch (Exception e)
- {
- return LuaDLL.toluaL_exception(L, e);
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_endType(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int ret = obj.endType;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index endType on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_endVal(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int ret = obj.endVal;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index endVal on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_resultType(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int ret = obj.resultType;
- LuaDLL.lua_pushinteger(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index resultType on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int get_win(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- bool ret = obj.win;
- LuaDLL.lua_pushboolean(L, ret);
- return 1;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index win on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_endType(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
- obj.endType = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index endType on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_endVal(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
- obj.endVal = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index endVal on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_resultType(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
- obj.resultType = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index resultType on a nil value");
- }
- }
- [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
- static int set_win(IntPtr L)
- {
- object o = null;
- try
- {
- o = ToLua.ToObject(L, 1);
- BattleEndCondition obj = (BattleEndCondition)o;
- bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
- obj.win = arg0;
- return 0;
- }
- catch(Exception e)
- {
- return LuaDLL.toluaL_exception(L, e, o, "attempt to index win on a nil value");
- }
- }
- }
|