Spine_AnimationStateWrap.cs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. //this source code was auto-generated by tolua#, do not modify it
  2. using System;
  3. using LuaInterface;
  4. public class Spine_AnimationStateWrap
  5. {
  6. public static void Register(LuaState L)
  7. {
  8. L.BeginClass(typeof(Spine.AnimationState), typeof(System.Object), "AnimationState");
  9. L.RegFunction("AssignEventSubscribersFrom", AssignEventSubscribersFrom);
  10. L.RegFunction("AddEventSubscribersFrom", AddEventSubscribersFrom);
  11. L.RegFunction("Update", Update);
  12. L.RegFunction("Apply", Apply);
  13. L.RegFunction("ClearTracks", ClearTracks);
  14. L.RegFunction("ClearTrack", ClearTrack);
  15. L.RegFunction("SetAnimation", SetAnimation);
  16. L.RegFunction("AddAnimation", AddAnimation);
  17. L.RegFunction("SetEmptyAnimation", SetEmptyAnimation);
  18. L.RegFunction("AddEmptyAnimation", AddEmptyAnimation);
  19. L.RegFunction("SetEmptyAnimations", SetEmptyAnimations);
  20. L.RegFunction("GetCurrent", GetCurrent);
  21. L.RegFunction("ClearListenerNotifications", ClearListenerNotifications);
  22. L.RegFunction("ToString", ToString);
  23. L.RegFunction("New", _CreateSpine_AnimationState);
  24. L.RegFunction("__tostring", ToLua.op_ToString);
  25. L.RegVar("TimeScale", get_TimeScale, set_TimeScale);
  26. L.RegVar("Data", get_Data, set_Data);
  27. L.RegVar("Tracks", get_Tracks, null);
  28. L.RegVar("Start", get_Start, set_Start);
  29. L.RegVar("Interrupt", get_Interrupt, set_Interrupt);
  30. L.RegVar("End", get_End, set_End);
  31. L.RegVar("Dispose", get_Dispose, set_Dispose);
  32. L.RegVar("Complete", get_Complete, set_Complete);
  33. L.RegVar("Event", get_Event, set_Event);
  34. L.RegFunction("TrackEntryEventDelegate", Spine_AnimationState_TrackEntryEventDelegate);
  35. L.RegFunction("TrackEntryDelegate", Spine_AnimationState_TrackEntryDelegate);
  36. L.EndClass();
  37. }
  38. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  39. static int _CreateSpine_AnimationState(IntPtr L)
  40. {
  41. try
  42. {
  43. int count = LuaDLL.lua_gettop(L);
  44. if (count == 1)
  45. {
  46. Spine.AnimationStateData arg0 = (Spine.AnimationStateData)ToLua.CheckObject<Spine.AnimationStateData>(L, 1);
  47. Spine.AnimationState obj = new Spine.AnimationState(arg0);
  48. ToLua.PushObject(L, obj);
  49. return 1;
  50. }
  51. else
  52. {
  53. return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: Spine.AnimationState.New");
  54. }
  55. }
  56. catch (Exception e)
  57. {
  58. return LuaDLL.toluaL_exception(L, e);
  59. }
  60. }
  61. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  62. static int AssignEventSubscribersFrom(IntPtr L)
  63. {
  64. try
  65. {
  66. ToLua.CheckArgsCount(L, 2);
  67. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  68. Spine.AnimationState arg0 = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 2);
  69. obj.AssignEventSubscribersFrom(arg0);
  70. return 0;
  71. }
  72. catch (Exception e)
  73. {
  74. return LuaDLL.toluaL_exception(L, e);
  75. }
  76. }
  77. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  78. static int AddEventSubscribersFrom(IntPtr L)
  79. {
  80. try
  81. {
  82. ToLua.CheckArgsCount(L, 2);
  83. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  84. Spine.AnimationState arg0 = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 2);
  85. obj.AddEventSubscribersFrom(arg0);
  86. return 0;
  87. }
  88. catch (Exception e)
  89. {
  90. return LuaDLL.toluaL_exception(L, e);
  91. }
  92. }
  93. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  94. static int Update(IntPtr L)
  95. {
  96. try
  97. {
  98. ToLua.CheckArgsCount(L, 2);
  99. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  100. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  101. obj.Update(arg0);
  102. return 0;
  103. }
  104. catch (Exception e)
  105. {
  106. return LuaDLL.toluaL_exception(L, e);
  107. }
  108. }
  109. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  110. static int Apply(IntPtr L)
  111. {
  112. try
  113. {
  114. ToLua.CheckArgsCount(L, 2);
  115. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  116. Spine.Skeleton arg0 = (Spine.Skeleton)ToLua.CheckObject<Spine.Skeleton>(L, 2);
  117. bool o = obj.Apply(arg0);
  118. LuaDLL.lua_pushboolean(L, o);
  119. return 1;
  120. }
  121. catch (Exception e)
  122. {
  123. return LuaDLL.toluaL_exception(L, e);
  124. }
  125. }
  126. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  127. static int ClearTracks(IntPtr L)
  128. {
  129. try
  130. {
  131. ToLua.CheckArgsCount(L, 1);
  132. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  133. obj.ClearTracks();
  134. return 0;
  135. }
  136. catch (Exception e)
  137. {
  138. return LuaDLL.toluaL_exception(L, e);
  139. }
  140. }
  141. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  142. static int ClearTrack(IntPtr L)
  143. {
  144. try
  145. {
  146. ToLua.CheckArgsCount(L, 2);
  147. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  148. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  149. obj.ClearTrack(arg0);
  150. return 0;
  151. }
  152. catch (Exception e)
  153. {
  154. return LuaDLL.toluaL_exception(L, e);
  155. }
  156. }
  157. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  158. static int SetAnimation(IntPtr L)
  159. {
  160. try
  161. {
  162. int count = LuaDLL.lua_gettop(L);
  163. if (count == 4 && TypeChecker.CheckTypes<string, bool>(L, 3))
  164. {
  165. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  166. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  167. string arg1 = ToLua.ToString(L, 3);
  168. bool arg2 = LuaDLL.lua_toboolean(L, 4);
  169. Spine.TrackEntry o = obj.SetAnimation(arg0, arg1, arg2);
  170. ToLua.PushObject(L, o);
  171. return 1;
  172. }
  173. else if (count == 4 && TypeChecker.CheckTypes<Spine.Animation, bool>(L, 3))
  174. {
  175. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  176. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  177. Spine.Animation arg1 = (Spine.Animation)ToLua.ToObject(L, 3);
  178. bool arg2 = LuaDLL.lua_toboolean(L, 4);
  179. Spine.TrackEntry o = obj.SetAnimation(arg0, arg1, arg2);
  180. ToLua.PushObject(L, o);
  181. return 1;
  182. }
  183. else
  184. {
  185. return LuaDLL.luaL_throw(L, "invalid arguments to method: Spine.AnimationState.SetAnimation");
  186. }
  187. }
  188. catch (Exception e)
  189. {
  190. return LuaDLL.toluaL_exception(L, e);
  191. }
  192. }
  193. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  194. static int AddAnimation(IntPtr L)
  195. {
  196. try
  197. {
  198. int count = LuaDLL.lua_gettop(L);
  199. if (count == 5 && TypeChecker.CheckTypes<string, bool, float>(L, 3))
  200. {
  201. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  202. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  203. string arg1 = ToLua.ToString(L, 3);
  204. bool arg2 = LuaDLL.lua_toboolean(L, 4);
  205. float arg3 = (float)LuaDLL.lua_tonumber(L, 5);
  206. Spine.TrackEntry o = obj.AddAnimation(arg0, arg1, arg2, arg3);
  207. ToLua.PushObject(L, o);
  208. return 1;
  209. }
  210. else if (count == 5 && TypeChecker.CheckTypes<Spine.Animation, bool, float>(L, 3))
  211. {
  212. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  213. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  214. Spine.Animation arg1 = (Spine.Animation)ToLua.ToObject(L, 3);
  215. bool arg2 = LuaDLL.lua_toboolean(L, 4);
  216. float arg3 = (float)LuaDLL.lua_tonumber(L, 5);
  217. Spine.TrackEntry o = obj.AddAnimation(arg0, arg1, arg2, arg3);
  218. ToLua.PushObject(L, o);
  219. return 1;
  220. }
  221. else
  222. {
  223. return LuaDLL.luaL_throw(L, "invalid arguments to method: Spine.AnimationState.AddAnimation");
  224. }
  225. }
  226. catch (Exception e)
  227. {
  228. return LuaDLL.toluaL_exception(L, e);
  229. }
  230. }
  231. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  232. static int SetEmptyAnimation(IntPtr L)
  233. {
  234. try
  235. {
  236. ToLua.CheckArgsCount(L, 3);
  237. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  238. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  239. float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
  240. Spine.TrackEntry o = obj.SetEmptyAnimation(arg0, arg1);
  241. ToLua.PushObject(L, o);
  242. return 1;
  243. }
  244. catch (Exception e)
  245. {
  246. return LuaDLL.toluaL_exception(L, e);
  247. }
  248. }
  249. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  250. static int AddEmptyAnimation(IntPtr L)
  251. {
  252. try
  253. {
  254. ToLua.CheckArgsCount(L, 4);
  255. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  256. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  257. float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
  258. float arg2 = (float)LuaDLL.luaL_checknumber(L, 4);
  259. Spine.TrackEntry o = obj.AddEmptyAnimation(arg0, arg1, arg2);
  260. ToLua.PushObject(L, o);
  261. return 1;
  262. }
  263. catch (Exception e)
  264. {
  265. return LuaDLL.toluaL_exception(L, e);
  266. }
  267. }
  268. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  269. static int SetEmptyAnimations(IntPtr L)
  270. {
  271. try
  272. {
  273. ToLua.CheckArgsCount(L, 2);
  274. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  275. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  276. obj.SetEmptyAnimations(arg0);
  277. return 0;
  278. }
  279. catch (Exception e)
  280. {
  281. return LuaDLL.toluaL_exception(L, e);
  282. }
  283. }
  284. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  285. static int GetCurrent(IntPtr L)
  286. {
  287. try
  288. {
  289. ToLua.CheckArgsCount(L, 2);
  290. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  291. int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
  292. Spine.TrackEntry o = obj.GetCurrent(arg0);
  293. ToLua.PushObject(L, o);
  294. return 1;
  295. }
  296. catch (Exception e)
  297. {
  298. return LuaDLL.toluaL_exception(L, e);
  299. }
  300. }
  301. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  302. static int ClearListenerNotifications(IntPtr L)
  303. {
  304. try
  305. {
  306. ToLua.CheckArgsCount(L, 1);
  307. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  308. obj.ClearListenerNotifications();
  309. return 0;
  310. }
  311. catch (Exception e)
  312. {
  313. return LuaDLL.toluaL_exception(L, e);
  314. }
  315. }
  316. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  317. static int ToString(IntPtr L)
  318. {
  319. try
  320. {
  321. ToLua.CheckArgsCount(L, 1);
  322. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject<Spine.AnimationState>(L, 1);
  323. string o = obj.ToString();
  324. LuaDLL.lua_pushstring(L, o);
  325. return 1;
  326. }
  327. catch (Exception e)
  328. {
  329. return LuaDLL.toluaL_exception(L, e);
  330. }
  331. }
  332. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  333. static int get_TimeScale(IntPtr L)
  334. {
  335. object o = null;
  336. try
  337. {
  338. o = ToLua.ToObject(L, 1);
  339. Spine.AnimationState obj = (Spine.AnimationState)o;
  340. float ret = obj.TimeScale;
  341. LuaDLL.lua_pushnumber(L, ret);
  342. return 1;
  343. }
  344. catch(Exception e)
  345. {
  346. return LuaDLL.toluaL_exception(L, e, o, "attempt to index TimeScale on a nil value");
  347. }
  348. }
  349. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  350. static int get_Data(IntPtr L)
  351. {
  352. object o = null;
  353. try
  354. {
  355. o = ToLua.ToObject(L, 1);
  356. Spine.AnimationState obj = (Spine.AnimationState)o;
  357. Spine.AnimationStateData ret = obj.Data;
  358. ToLua.PushObject(L, ret);
  359. return 1;
  360. }
  361. catch(Exception e)
  362. {
  363. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Data on a nil value");
  364. }
  365. }
  366. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  367. static int get_Tracks(IntPtr L)
  368. {
  369. object o = null;
  370. try
  371. {
  372. o = ToLua.ToObject(L, 1);
  373. Spine.AnimationState obj = (Spine.AnimationState)o;
  374. Spine.ExposedList<Spine.TrackEntry> ret = obj.Tracks;
  375. ToLua.PushObject(L, ret);
  376. return 1;
  377. }
  378. catch(Exception e)
  379. {
  380. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Tracks on a nil value");
  381. }
  382. }
  383. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  384. static int get_Start(IntPtr L)
  385. {
  386. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryDelegate)));
  387. return 1;
  388. }
  389. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  390. static int get_Interrupt(IntPtr L)
  391. {
  392. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryDelegate)));
  393. return 1;
  394. }
  395. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  396. static int get_End(IntPtr L)
  397. {
  398. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryDelegate)));
  399. return 1;
  400. }
  401. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  402. static int get_Dispose(IntPtr L)
  403. {
  404. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryDelegate)));
  405. return 1;
  406. }
  407. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  408. static int get_Complete(IntPtr L)
  409. {
  410. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryDelegate)));
  411. return 1;
  412. }
  413. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  414. static int get_Event(IntPtr L)
  415. {
  416. ToLua.Push(L, new EventObject(typeof(Spine.AnimationState.TrackEntryEventDelegate)));
  417. return 1;
  418. }
  419. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  420. static int set_TimeScale(IntPtr L)
  421. {
  422. object o = null;
  423. try
  424. {
  425. o = ToLua.ToObject(L, 1);
  426. Spine.AnimationState obj = (Spine.AnimationState)o;
  427. float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
  428. obj.TimeScale = arg0;
  429. return 0;
  430. }
  431. catch(Exception e)
  432. {
  433. return LuaDLL.toluaL_exception(L, e, o, "attempt to index TimeScale on a nil value");
  434. }
  435. }
  436. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  437. static int set_Data(IntPtr L)
  438. {
  439. object o = null;
  440. try
  441. {
  442. o = ToLua.ToObject(L, 1);
  443. Spine.AnimationState obj = (Spine.AnimationState)o;
  444. Spine.AnimationStateData arg0 = (Spine.AnimationStateData)ToLua.CheckObject<Spine.AnimationStateData>(L, 2);
  445. obj.Data = arg0;
  446. return 0;
  447. }
  448. catch(Exception e)
  449. {
  450. return LuaDLL.toluaL_exception(L, e, o, "attempt to index Data on a nil value");
  451. }
  452. }
  453. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  454. static int set_Start(IntPtr L)
  455. {
  456. try
  457. {
  458. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  459. EventObject arg0 = null;
  460. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  461. {
  462. arg0 = (EventObject)ToLua.ToObject(L, 2);
  463. }
  464. else
  465. {
  466. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.Start' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  467. }
  468. if (arg0.op == EventOp.Add)
  469. {
  470. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  471. obj.Start += ev;
  472. }
  473. else if (arg0.op == EventOp.Sub)
  474. {
  475. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  476. obj.Start -= ev;
  477. }
  478. return 0;
  479. }
  480. catch (Exception e)
  481. {
  482. return LuaDLL.toluaL_exception(L, e);
  483. }
  484. }
  485. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  486. static int set_Interrupt(IntPtr L)
  487. {
  488. try
  489. {
  490. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  491. EventObject arg0 = null;
  492. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  493. {
  494. arg0 = (EventObject)ToLua.ToObject(L, 2);
  495. }
  496. else
  497. {
  498. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.Interrupt' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  499. }
  500. if (arg0.op == EventOp.Add)
  501. {
  502. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  503. obj.Interrupt += ev;
  504. }
  505. else if (arg0.op == EventOp.Sub)
  506. {
  507. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  508. obj.Interrupt -= ev;
  509. }
  510. return 0;
  511. }
  512. catch (Exception e)
  513. {
  514. return LuaDLL.toluaL_exception(L, e);
  515. }
  516. }
  517. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  518. static int set_End(IntPtr L)
  519. {
  520. try
  521. {
  522. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  523. EventObject arg0 = null;
  524. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  525. {
  526. arg0 = (EventObject)ToLua.ToObject(L, 2);
  527. }
  528. else
  529. {
  530. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.End' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  531. }
  532. if (arg0.op == EventOp.Add)
  533. {
  534. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  535. obj.End += ev;
  536. }
  537. else if (arg0.op == EventOp.Sub)
  538. {
  539. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  540. obj.End -= ev;
  541. }
  542. return 0;
  543. }
  544. catch (Exception e)
  545. {
  546. return LuaDLL.toluaL_exception(L, e);
  547. }
  548. }
  549. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  550. static int set_Dispose(IntPtr L)
  551. {
  552. try
  553. {
  554. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  555. EventObject arg0 = null;
  556. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  557. {
  558. arg0 = (EventObject)ToLua.ToObject(L, 2);
  559. }
  560. else
  561. {
  562. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.Dispose' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  563. }
  564. if (arg0.op == EventOp.Add)
  565. {
  566. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  567. obj.Dispose += ev;
  568. }
  569. else if (arg0.op == EventOp.Sub)
  570. {
  571. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  572. obj.Dispose -= ev;
  573. }
  574. return 0;
  575. }
  576. catch (Exception e)
  577. {
  578. return LuaDLL.toluaL_exception(L, e);
  579. }
  580. }
  581. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  582. static int set_Complete(IntPtr L)
  583. {
  584. try
  585. {
  586. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  587. EventObject arg0 = null;
  588. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  589. {
  590. arg0 = (EventObject)ToLua.ToObject(L, 2);
  591. }
  592. else
  593. {
  594. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.Complete' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  595. }
  596. if (arg0.op == EventOp.Add)
  597. {
  598. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  599. obj.Complete += ev;
  600. }
  601. else if (arg0.op == EventOp.Sub)
  602. {
  603. Spine.AnimationState.TrackEntryDelegate ev = (Spine.AnimationState.TrackEntryDelegate)arg0.func;
  604. obj.Complete -= ev;
  605. }
  606. return 0;
  607. }
  608. catch (Exception e)
  609. {
  610. return LuaDLL.toluaL_exception(L, e);
  611. }
  612. }
  613. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  614. static int set_Event(IntPtr L)
  615. {
  616. try
  617. {
  618. Spine.AnimationState obj = (Spine.AnimationState)ToLua.CheckObject(L, 1, typeof(Spine.AnimationState));
  619. EventObject arg0 = null;
  620. if (LuaDLL.lua_isuserdata(L, 2) != 0)
  621. {
  622. arg0 = (EventObject)ToLua.ToObject(L, 2);
  623. }
  624. else
  625. {
  626. return LuaDLL.luaL_throw(L, "The event 'Spine.AnimationState.Event' can only appear on the left hand side of += or -= when used outside of the type 'Spine.AnimationState'");
  627. }
  628. if (arg0.op == EventOp.Add)
  629. {
  630. Spine.AnimationState.TrackEntryEventDelegate ev = (Spine.AnimationState.TrackEntryEventDelegate)arg0.func;
  631. obj.Event += ev;
  632. }
  633. else if (arg0.op == EventOp.Sub)
  634. {
  635. Spine.AnimationState.TrackEntryEventDelegate ev = (Spine.AnimationState.TrackEntryEventDelegate)arg0.func;
  636. obj.Event -= ev;
  637. }
  638. return 0;
  639. }
  640. catch (Exception e)
  641. {
  642. return LuaDLL.toluaL_exception(L, e);
  643. }
  644. }
  645. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  646. static int Spine_AnimationState_TrackEntryEventDelegate(IntPtr L)
  647. {
  648. try
  649. {
  650. int count = LuaDLL.lua_gettop(L);
  651. LuaFunction func = ToLua.CheckLuaFunction(L, 1);
  652. if (count == 1)
  653. {
  654. Delegate arg1 = DelegateTraits<Spine.AnimationState.TrackEntryEventDelegate>.Create(func);
  655. ToLua.Push(L, arg1);
  656. }
  657. else
  658. {
  659. LuaTable self = ToLua.CheckLuaTable(L, 2);
  660. Delegate arg1 = DelegateTraits<Spine.AnimationState.TrackEntryEventDelegate>.Create(func, self);
  661. ToLua.Push(L, arg1);
  662. }
  663. return 1;
  664. }
  665. catch(Exception e)
  666. {
  667. return LuaDLL.toluaL_exception(L, e);
  668. }
  669. }
  670. [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
  671. static int Spine_AnimationState_TrackEntryDelegate(IntPtr L)
  672. {
  673. try
  674. {
  675. int count = LuaDLL.lua_gettop(L);
  676. LuaFunction func = ToLua.CheckLuaFunction(L, 1);
  677. if (count == 1)
  678. {
  679. Delegate arg1 = DelegateTraits<Spine.AnimationState.TrackEntryDelegate>.Create(func);
  680. ToLua.Push(L, arg1);
  681. }
  682. else
  683. {
  684. LuaTable self = ToLua.CheckLuaTable(L, 2);
  685. Delegate arg1 = DelegateTraits<Spine.AnimationState.TrackEntryDelegate>.Create(func, self);
  686. ToLua.Push(L, arg1);
  687. }
  688. return 1;
  689. }
  690. catch(Exception e)
  691. {
  692. return LuaDLL.toluaL_exception(L, e);
  693. }
  694. }
  695. }