lua_AnimationClip.cpp 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601
  1. // Autogenerated by gameplay-luagen
  2. #include "Base.h"
  3. #include "ScriptController.h"
  4. #include "lua_AnimationClip.h"
  5. #include "Animation.h"
  6. #include "AnimationClip.h"
  7. #include "AnimationTarget.h"
  8. #include "Base.h"
  9. #include "Game.h"
  10. #include "Quaternion.h"
  11. #include "Ref.h"
  12. #include "ScriptController.h"
  13. #include "ScriptTarget.h"
  14. namespace gameplay
  15. {
  16. void luaRegister_AnimationClip()
  17. {
  18. const luaL_Reg lua_members[] =
  19. {
  20. {"addBeginListener", lua_AnimationClip_addBeginListener},
  21. {"addEndListener", lua_AnimationClip_addEndListener},
  22. {"addListener", lua_AnimationClip_addListener},
  23. {"addRef", lua_AnimationClip_addRef},
  24. {"addScript", lua_AnimationClip_addScript},
  25. {"addScriptCallback", lua_AnimationClip_addScriptCallback},
  26. {"clearScripts", lua_AnimationClip_clearScripts},
  27. {"crossFade", lua_AnimationClip_crossFade},
  28. {"getActiveDuration", lua_AnimationClip_getActiveDuration},
  29. {"getAnimation", lua_AnimationClip_getAnimation},
  30. {"getBlendWeight", lua_AnimationClip_getBlendWeight},
  31. {"getDuration", lua_AnimationClip_getDuration},
  32. {"getElapsedTime", lua_AnimationClip_getElapsedTime},
  33. {"getEndTime", lua_AnimationClip_getEndTime},
  34. {"getId", lua_AnimationClip_getId},
  35. {"getLoopBlendTime", lua_AnimationClip_getLoopBlendTime},
  36. {"getRefCount", lua_AnimationClip_getRefCount},
  37. {"getRepeatCount", lua_AnimationClip_getRepeatCount},
  38. {"getScriptEvent", lua_AnimationClip_getScriptEvent},
  39. {"getSpeed", lua_AnimationClip_getSpeed},
  40. {"getStartTime", lua_AnimationClip_getStartTime},
  41. {"getTypeName", lua_AnimationClip_getTypeName},
  42. {"hasScriptListener", lua_AnimationClip_hasScriptListener},
  43. {"isPlaying", lua_AnimationClip_isPlaying},
  44. {"pause", lua_AnimationClip_pause},
  45. {"play", lua_AnimationClip_play},
  46. {"release", lua_AnimationClip_release},
  47. {"removeBeginListener", lua_AnimationClip_removeBeginListener},
  48. {"removeEndListener", lua_AnimationClip_removeEndListener},
  49. {"removeListener", lua_AnimationClip_removeListener},
  50. {"removeScript", lua_AnimationClip_removeScript},
  51. {"removeScriptCallback", lua_AnimationClip_removeScriptCallback},
  52. {"setActiveDuration", lua_AnimationClip_setActiveDuration},
  53. {"setBlendWeight", lua_AnimationClip_setBlendWeight},
  54. {"setLoopBlendTime", lua_AnimationClip_setLoopBlendTime},
  55. {"setRepeatCount", lua_AnimationClip_setRepeatCount},
  56. {"setSpeed", lua_AnimationClip_setSpeed},
  57. {"stop", lua_AnimationClip_stop},
  58. {NULL, NULL}
  59. };
  60. const luaL_Reg lua_statics[] =
  61. {
  62. {"REPEAT_INDEFINITE", lua_AnimationClip_static_REPEAT_INDEFINITE},
  63. {NULL, NULL}
  64. };
  65. std::vector<std::string> scopePath;
  66. gameplay::ScriptUtil::registerClass("AnimationClip", lua_members, NULL, lua_AnimationClip__gc, lua_statics, scopePath);
  67. }
  68. static AnimationClip* getInstance(lua_State* state)
  69. {
  70. void* userdata = luaL_checkudata(state, 1, "AnimationClip");
  71. luaL_argcheck(state, userdata != NULL, 1, "'AnimationClip' expected.");
  72. return (AnimationClip*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance;
  73. }
  74. int lua_AnimationClip__gc(lua_State* state)
  75. {
  76. // Get the number of parameters.
  77. int paramCount = lua_gettop(state);
  78. // Attempt to match the parameters to a valid binding.
  79. switch (paramCount)
  80. {
  81. case 1:
  82. {
  83. if ((lua_type(state, 1) == LUA_TUSERDATA))
  84. {
  85. void* userdata = luaL_checkudata(state, 1, "AnimationClip");
  86. luaL_argcheck(state, userdata != NULL, 1, "'AnimationClip' expected.");
  87. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata;
  88. if (object->owns)
  89. {
  90. AnimationClip* instance = (AnimationClip*)object->instance;
  91. SAFE_RELEASE(instance);
  92. }
  93. return 0;
  94. }
  95. lua_pushstring(state, "lua_AnimationClip__gc - Failed to match the given parameters to a valid function signature.");
  96. lua_error(state);
  97. break;
  98. }
  99. default:
  100. {
  101. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  102. lua_error(state);
  103. break;
  104. }
  105. }
  106. return 0;
  107. }
  108. int lua_AnimationClip_addBeginListener(lua_State* state)
  109. {
  110. // Get the number of parameters.
  111. int paramCount = lua_gettop(state);
  112. // Attempt to match the parameters to a valid binding.
  113. switch (paramCount)
  114. {
  115. case 2:
  116. {
  117. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  118. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  119. {
  120. // Get parameter 1 off the stack.
  121. bool param1Valid;
  122. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  123. if (!param1Valid)
  124. {
  125. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  126. lua_error(state);
  127. }
  128. AnimationClip* instance = getInstance(state);
  129. instance->addBeginListener(param1);
  130. return 0;
  131. }
  132. lua_pushstring(state, "lua_AnimationClip_addBeginListener - Failed to match the given parameters to a valid function signature.");
  133. lua_error(state);
  134. break;
  135. }
  136. default:
  137. {
  138. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  139. lua_error(state);
  140. break;
  141. }
  142. }
  143. return 0;
  144. }
  145. int lua_AnimationClip_addEndListener(lua_State* state)
  146. {
  147. // Get the number of parameters.
  148. int paramCount = lua_gettop(state);
  149. // Attempt to match the parameters to a valid binding.
  150. switch (paramCount)
  151. {
  152. case 2:
  153. {
  154. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  155. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  156. {
  157. // Get parameter 1 off the stack.
  158. bool param1Valid;
  159. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  160. if (!param1Valid)
  161. {
  162. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  163. lua_error(state);
  164. }
  165. AnimationClip* instance = getInstance(state);
  166. instance->addEndListener(param1);
  167. return 0;
  168. }
  169. lua_pushstring(state, "lua_AnimationClip_addEndListener - Failed to match the given parameters to a valid function signature.");
  170. lua_error(state);
  171. break;
  172. }
  173. default:
  174. {
  175. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  176. lua_error(state);
  177. break;
  178. }
  179. }
  180. return 0;
  181. }
  182. int lua_AnimationClip_addListener(lua_State* state)
  183. {
  184. // Get the number of parameters.
  185. int paramCount = lua_gettop(state);
  186. // Attempt to match the parameters to a valid binding.
  187. switch (paramCount)
  188. {
  189. case 3:
  190. {
  191. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  192. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  193. lua_type(state, 3) == LUA_TNUMBER)
  194. {
  195. // Get parameter 1 off the stack.
  196. bool param1Valid;
  197. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  198. if (!param1Valid)
  199. {
  200. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  201. lua_error(state);
  202. }
  203. // Get parameter 2 off the stack.
  204. unsigned long param2 = (unsigned long)luaL_checkunsigned(state, 3);
  205. AnimationClip* instance = getInstance(state);
  206. instance->addListener(param1, param2);
  207. return 0;
  208. }
  209. lua_pushstring(state, "lua_AnimationClip_addListener - Failed to match the given parameters to a valid function signature.");
  210. lua_error(state);
  211. break;
  212. }
  213. default:
  214. {
  215. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  216. lua_error(state);
  217. break;
  218. }
  219. }
  220. return 0;
  221. }
  222. int lua_AnimationClip_addRef(lua_State* state)
  223. {
  224. // Get the number of parameters.
  225. int paramCount = lua_gettop(state);
  226. // Attempt to match the parameters to a valid binding.
  227. switch (paramCount)
  228. {
  229. case 1:
  230. {
  231. if ((lua_type(state, 1) == LUA_TUSERDATA))
  232. {
  233. AnimationClip* instance = getInstance(state);
  234. instance->addRef();
  235. return 0;
  236. }
  237. lua_pushstring(state, "lua_AnimationClip_addRef - Failed to match the given parameters to a valid function signature.");
  238. lua_error(state);
  239. break;
  240. }
  241. default:
  242. {
  243. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  244. lua_error(state);
  245. break;
  246. }
  247. }
  248. return 0;
  249. }
  250. int lua_AnimationClip_addScript(lua_State* state)
  251. {
  252. // Get the number of parameters.
  253. int paramCount = lua_gettop(state);
  254. // Attempt to match the parameters to a valid binding.
  255. switch (paramCount)
  256. {
  257. case 2:
  258. {
  259. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  260. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  261. {
  262. // Get parameter 1 off the stack.
  263. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  264. AnimationClip* instance = getInstance(state);
  265. void* returnPtr = ((void*)instance->addScript(param1));
  266. if (returnPtr)
  267. {
  268. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  269. object->instance = returnPtr;
  270. object->owns = false;
  271. luaL_getmetatable(state, "Script");
  272. lua_setmetatable(state, -2);
  273. }
  274. else
  275. {
  276. lua_pushnil(state);
  277. }
  278. return 1;
  279. }
  280. lua_pushstring(state, "lua_AnimationClip_addScript - Failed to match the given parameters to a valid function signature.");
  281. lua_error(state);
  282. break;
  283. }
  284. default:
  285. {
  286. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  287. lua_error(state);
  288. break;
  289. }
  290. }
  291. return 0;
  292. }
  293. int lua_AnimationClip_addScriptCallback(lua_State* state)
  294. {
  295. // Get the number of parameters.
  296. int paramCount = lua_gettop(state);
  297. // Attempt to match the parameters to a valid binding.
  298. switch (paramCount)
  299. {
  300. case 3:
  301. {
  302. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  303. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  304. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  305. {
  306. // Get parameter 1 off the stack.
  307. bool param1Valid;
  308. gameplay::ScriptUtil::LuaArray<ScriptTarget::Event> param1 = gameplay::ScriptUtil::getObjectPointer<ScriptTarget::Event>(2, "ScriptTargetEvent", false, &param1Valid);
  309. if (!param1Valid)
  310. {
  311. lua_pushstring(state, "Failed to convert parameter 1 to type 'ScriptTarget::Event'.");
  312. lua_error(state);
  313. }
  314. // Get parameter 2 off the stack.
  315. const char* param2 = gameplay::ScriptUtil::getString(3, false);
  316. AnimationClip* instance = getInstance(state);
  317. instance->addScriptCallback(param1, param2);
  318. return 0;
  319. }
  320. lua_pushstring(state, "lua_AnimationClip_addScriptCallback - Failed to match the given parameters to a valid function signature.");
  321. lua_error(state);
  322. break;
  323. }
  324. default:
  325. {
  326. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  327. lua_error(state);
  328. break;
  329. }
  330. }
  331. return 0;
  332. }
  333. int lua_AnimationClip_clearScripts(lua_State* state)
  334. {
  335. // Get the number of parameters.
  336. int paramCount = lua_gettop(state);
  337. // Attempt to match the parameters to a valid binding.
  338. switch (paramCount)
  339. {
  340. case 1:
  341. {
  342. if ((lua_type(state, 1) == LUA_TUSERDATA))
  343. {
  344. AnimationClip* instance = getInstance(state);
  345. instance->clearScripts();
  346. return 0;
  347. }
  348. lua_pushstring(state, "lua_AnimationClip_clearScripts - Failed to match the given parameters to a valid function signature.");
  349. lua_error(state);
  350. break;
  351. }
  352. default:
  353. {
  354. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  355. lua_error(state);
  356. break;
  357. }
  358. }
  359. return 0;
  360. }
  361. int lua_AnimationClip_crossFade(lua_State* state)
  362. {
  363. // Get the number of parameters.
  364. int paramCount = lua_gettop(state);
  365. // Attempt to match the parameters to a valid binding.
  366. switch (paramCount)
  367. {
  368. case 3:
  369. {
  370. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  371. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  372. lua_type(state, 3) == LUA_TNUMBER)
  373. {
  374. // Get parameter 1 off the stack.
  375. bool param1Valid;
  376. gameplay::ScriptUtil::LuaArray<AnimationClip> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip>(2, "AnimationClip", false, &param1Valid);
  377. if (!param1Valid)
  378. {
  379. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip'.");
  380. lua_error(state);
  381. }
  382. // Get parameter 2 off the stack.
  383. unsigned long param2 = (unsigned long)luaL_checkunsigned(state, 3);
  384. AnimationClip* instance = getInstance(state);
  385. instance->crossFade(param1, param2);
  386. return 0;
  387. }
  388. lua_pushstring(state, "lua_AnimationClip_crossFade - Failed to match the given parameters to a valid function signature.");
  389. lua_error(state);
  390. break;
  391. }
  392. default:
  393. {
  394. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  395. lua_error(state);
  396. break;
  397. }
  398. }
  399. return 0;
  400. }
  401. int lua_AnimationClip_getActiveDuration(lua_State* state)
  402. {
  403. // Get the number of parameters.
  404. int paramCount = lua_gettop(state);
  405. // Attempt to match the parameters to a valid binding.
  406. switch (paramCount)
  407. {
  408. case 1:
  409. {
  410. if ((lua_type(state, 1) == LUA_TUSERDATA))
  411. {
  412. AnimationClip* instance = getInstance(state);
  413. unsigned long result = instance->getActiveDuration();
  414. // Push the return value onto the stack.
  415. lua_pushunsigned(state, result);
  416. return 1;
  417. }
  418. lua_pushstring(state, "lua_AnimationClip_getActiveDuration - Failed to match the given parameters to a valid function signature.");
  419. lua_error(state);
  420. break;
  421. }
  422. default:
  423. {
  424. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  425. lua_error(state);
  426. break;
  427. }
  428. }
  429. return 0;
  430. }
  431. int lua_AnimationClip_getAnimation(lua_State* state)
  432. {
  433. // Get the number of parameters.
  434. int paramCount = lua_gettop(state);
  435. // Attempt to match the parameters to a valid binding.
  436. switch (paramCount)
  437. {
  438. case 1:
  439. {
  440. if ((lua_type(state, 1) == LUA_TUSERDATA))
  441. {
  442. AnimationClip* instance = getInstance(state);
  443. void* returnPtr = ((void*)instance->getAnimation());
  444. if (returnPtr)
  445. {
  446. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  447. object->instance = returnPtr;
  448. object->owns = false;
  449. luaL_getmetatable(state, "Animation");
  450. lua_setmetatable(state, -2);
  451. }
  452. else
  453. {
  454. lua_pushnil(state);
  455. }
  456. return 1;
  457. }
  458. lua_pushstring(state, "lua_AnimationClip_getAnimation - Failed to match the given parameters to a valid function signature.");
  459. lua_error(state);
  460. break;
  461. }
  462. default:
  463. {
  464. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  465. lua_error(state);
  466. break;
  467. }
  468. }
  469. return 0;
  470. }
  471. int lua_AnimationClip_getBlendWeight(lua_State* state)
  472. {
  473. // Get the number of parameters.
  474. int paramCount = lua_gettop(state);
  475. // Attempt to match the parameters to a valid binding.
  476. switch (paramCount)
  477. {
  478. case 1:
  479. {
  480. if ((lua_type(state, 1) == LUA_TUSERDATA))
  481. {
  482. AnimationClip* instance = getInstance(state);
  483. float result = instance->getBlendWeight();
  484. // Push the return value onto the stack.
  485. lua_pushnumber(state, result);
  486. return 1;
  487. }
  488. lua_pushstring(state, "lua_AnimationClip_getBlendWeight - Failed to match the given parameters to a valid function signature.");
  489. lua_error(state);
  490. break;
  491. }
  492. default:
  493. {
  494. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  495. lua_error(state);
  496. break;
  497. }
  498. }
  499. return 0;
  500. }
  501. int lua_AnimationClip_getDuration(lua_State* state)
  502. {
  503. // Get the number of parameters.
  504. int paramCount = lua_gettop(state);
  505. // Attempt to match the parameters to a valid binding.
  506. switch (paramCount)
  507. {
  508. case 1:
  509. {
  510. if ((lua_type(state, 1) == LUA_TUSERDATA))
  511. {
  512. AnimationClip* instance = getInstance(state);
  513. unsigned long result = instance->getDuration();
  514. // Push the return value onto the stack.
  515. lua_pushunsigned(state, result);
  516. return 1;
  517. }
  518. lua_pushstring(state, "lua_AnimationClip_getDuration - Failed to match the given parameters to a valid function signature.");
  519. lua_error(state);
  520. break;
  521. }
  522. default:
  523. {
  524. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  525. lua_error(state);
  526. break;
  527. }
  528. }
  529. return 0;
  530. }
  531. int lua_AnimationClip_getElapsedTime(lua_State* state)
  532. {
  533. // Get the number of parameters.
  534. int paramCount = lua_gettop(state);
  535. // Attempt to match the parameters to a valid binding.
  536. switch (paramCount)
  537. {
  538. case 1:
  539. {
  540. if ((lua_type(state, 1) == LUA_TUSERDATA))
  541. {
  542. AnimationClip* instance = getInstance(state);
  543. float result = instance->getElapsedTime();
  544. // Push the return value onto the stack.
  545. lua_pushnumber(state, result);
  546. return 1;
  547. }
  548. lua_pushstring(state, "lua_AnimationClip_getElapsedTime - Failed to match the given parameters to a valid function signature.");
  549. lua_error(state);
  550. break;
  551. }
  552. default:
  553. {
  554. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  555. lua_error(state);
  556. break;
  557. }
  558. }
  559. return 0;
  560. }
  561. int lua_AnimationClip_getEndTime(lua_State* state)
  562. {
  563. // Get the number of parameters.
  564. int paramCount = lua_gettop(state);
  565. // Attempt to match the parameters to a valid binding.
  566. switch (paramCount)
  567. {
  568. case 1:
  569. {
  570. if ((lua_type(state, 1) == LUA_TUSERDATA))
  571. {
  572. AnimationClip* instance = getInstance(state);
  573. unsigned long result = instance->getEndTime();
  574. // Push the return value onto the stack.
  575. lua_pushunsigned(state, result);
  576. return 1;
  577. }
  578. lua_pushstring(state, "lua_AnimationClip_getEndTime - Failed to match the given parameters to a valid function signature.");
  579. lua_error(state);
  580. break;
  581. }
  582. default:
  583. {
  584. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  585. lua_error(state);
  586. break;
  587. }
  588. }
  589. return 0;
  590. }
  591. int lua_AnimationClip_getId(lua_State* state)
  592. {
  593. // Get the number of parameters.
  594. int paramCount = lua_gettop(state);
  595. // Attempt to match the parameters to a valid binding.
  596. switch (paramCount)
  597. {
  598. case 1:
  599. {
  600. if ((lua_type(state, 1) == LUA_TUSERDATA))
  601. {
  602. AnimationClip* instance = getInstance(state);
  603. const char* result = instance->getId();
  604. // Push the return value onto the stack.
  605. lua_pushstring(state, result);
  606. return 1;
  607. }
  608. lua_pushstring(state, "lua_AnimationClip_getId - Failed to match the given parameters to a valid function signature.");
  609. lua_error(state);
  610. break;
  611. }
  612. default:
  613. {
  614. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  615. lua_error(state);
  616. break;
  617. }
  618. }
  619. return 0;
  620. }
  621. int lua_AnimationClip_getLoopBlendTime(lua_State* state)
  622. {
  623. // Get the number of parameters.
  624. int paramCount = lua_gettop(state);
  625. // Attempt to match the parameters to a valid binding.
  626. switch (paramCount)
  627. {
  628. case 1:
  629. {
  630. if ((lua_type(state, 1) == LUA_TUSERDATA))
  631. {
  632. AnimationClip* instance = getInstance(state);
  633. float result = instance->getLoopBlendTime();
  634. // Push the return value onto the stack.
  635. lua_pushnumber(state, result);
  636. return 1;
  637. }
  638. lua_pushstring(state, "lua_AnimationClip_getLoopBlendTime - Failed to match the given parameters to a valid function signature.");
  639. lua_error(state);
  640. break;
  641. }
  642. default:
  643. {
  644. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  645. lua_error(state);
  646. break;
  647. }
  648. }
  649. return 0;
  650. }
  651. int lua_AnimationClip_getRefCount(lua_State* state)
  652. {
  653. // Get the number of parameters.
  654. int paramCount = lua_gettop(state);
  655. // Attempt to match the parameters to a valid binding.
  656. switch (paramCount)
  657. {
  658. case 1:
  659. {
  660. if ((lua_type(state, 1) == LUA_TUSERDATA))
  661. {
  662. AnimationClip* instance = getInstance(state);
  663. unsigned int result = instance->getRefCount();
  664. // Push the return value onto the stack.
  665. lua_pushunsigned(state, result);
  666. return 1;
  667. }
  668. lua_pushstring(state, "lua_AnimationClip_getRefCount - Failed to match the given parameters to a valid function signature.");
  669. lua_error(state);
  670. break;
  671. }
  672. default:
  673. {
  674. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  675. lua_error(state);
  676. break;
  677. }
  678. }
  679. return 0;
  680. }
  681. int lua_AnimationClip_getRepeatCount(lua_State* state)
  682. {
  683. // Get the number of parameters.
  684. int paramCount = lua_gettop(state);
  685. // Attempt to match the parameters to a valid binding.
  686. switch (paramCount)
  687. {
  688. case 1:
  689. {
  690. if ((lua_type(state, 1) == LUA_TUSERDATA))
  691. {
  692. AnimationClip* instance = getInstance(state);
  693. float result = instance->getRepeatCount();
  694. // Push the return value onto the stack.
  695. lua_pushnumber(state, result);
  696. return 1;
  697. }
  698. lua_pushstring(state, "lua_AnimationClip_getRepeatCount - Failed to match the given parameters to a valid function signature.");
  699. lua_error(state);
  700. break;
  701. }
  702. default:
  703. {
  704. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  705. lua_error(state);
  706. break;
  707. }
  708. }
  709. return 0;
  710. }
  711. int lua_AnimationClip_getScriptEvent(lua_State* state)
  712. {
  713. // Get the number of parameters.
  714. int paramCount = lua_gettop(state);
  715. // Attempt to match the parameters to a valid binding.
  716. switch (paramCount)
  717. {
  718. case 2:
  719. {
  720. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  721. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  722. {
  723. // Get parameter 1 off the stack.
  724. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  725. AnimationClip* instance = getInstance(state);
  726. void* returnPtr = ((void*)instance->getScriptEvent(param1));
  727. if (returnPtr)
  728. {
  729. gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject));
  730. object->instance = returnPtr;
  731. object->owns = false;
  732. luaL_getmetatable(state, "ScriptTargetEvent");
  733. lua_setmetatable(state, -2);
  734. }
  735. else
  736. {
  737. lua_pushnil(state);
  738. }
  739. return 1;
  740. }
  741. lua_pushstring(state, "lua_AnimationClip_getScriptEvent - Failed to match the given parameters to a valid function signature.");
  742. lua_error(state);
  743. break;
  744. }
  745. default:
  746. {
  747. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  748. lua_error(state);
  749. break;
  750. }
  751. }
  752. return 0;
  753. }
  754. int lua_AnimationClip_getSpeed(lua_State* state)
  755. {
  756. // Get the number of parameters.
  757. int paramCount = lua_gettop(state);
  758. // Attempt to match the parameters to a valid binding.
  759. switch (paramCount)
  760. {
  761. case 1:
  762. {
  763. if ((lua_type(state, 1) == LUA_TUSERDATA))
  764. {
  765. AnimationClip* instance = getInstance(state);
  766. float result = instance->getSpeed();
  767. // Push the return value onto the stack.
  768. lua_pushnumber(state, result);
  769. return 1;
  770. }
  771. lua_pushstring(state, "lua_AnimationClip_getSpeed - Failed to match the given parameters to a valid function signature.");
  772. lua_error(state);
  773. break;
  774. }
  775. default:
  776. {
  777. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  778. lua_error(state);
  779. break;
  780. }
  781. }
  782. return 0;
  783. }
  784. int lua_AnimationClip_getStartTime(lua_State* state)
  785. {
  786. // Get the number of parameters.
  787. int paramCount = lua_gettop(state);
  788. // Attempt to match the parameters to a valid binding.
  789. switch (paramCount)
  790. {
  791. case 1:
  792. {
  793. if ((lua_type(state, 1) == LUA_TUSERDATA))
  794. {
  795. AnimationClip* instance = getInstance(state);
  796. unsigned long result = instance->getStartTime();
  797. // Push the return value onto the stack.
  798. lua_pushunsigned(state, result);
  799. return 1;
  800. }
  801. lua_pushstring(state, "lua_AnimationClip_getStartTime - Failed to match the given parameters to a valid function signature.");
  802. lua_error(state);
  803. break;
  804. }
  805. default:
  806. {
  807. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  808. lua_error(state);
  809. break;
  810. }
  811. }
  812. return 0;
  813. }
  814. int lua_AnimationClip_getTypeName(lua_State* state)
  815. {
  816. // Get the number of parameters.
  817. int paramCount = lua_gettop(state);
  818. // Attempt to match the parameters to a valid binding.
  819. switch (paramCount)
  820. {
  821. case 1:
  822. {
  823. if ((lua_type(state, 1) == LUA_TUSERDATA))
  824. {
  825. AnimationClip* instance = getInstance(state);
  826. const char* result = instance->getTypeName();
  827. // Push the return value onto the stack.
  828. lua_pushstring(state, result);
  829. return 1;
  830. }
  831. lua_pushstring(state, "lua_AnimationClip_getTypeName - Failed to match the given parameters to a valid function signature.");
  832. lua_error(state);
  833. break;
  834. }
  835. default:
  836. {
  837. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  838. lua_error(state);
  839. break;
  840. }
  841. }
  842. return 0;
  843. }
  844. int lua_AnimationClip_hasScriptListener(lua_State* state)
  845. {
  846. // Get the number of parameters.
  847. int paramCount = lua_gettop(state);
  848. // Attempt to match the parameters to a valid binding.
  849. switch (paramCount)
  850. {
  851. case 2:
  852. {
  853. do
  854. {
  855. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  856. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  857. {
  858. // Get parameter 1 off the stack.
  859. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  860. AnimationClip* instance = getInstance(state);
  861. bool result = instance->hasScriptListener(param1);
  862. // Push the return value onto the stack.
  863. lua_pushboolean(state, result);
  864. return 1;
  865. }
  866. } while (0);
  867. do
  868. {
  869. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  870. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  871. {
  872. // Get parameter 1 off the stack.
  873. bool param1Valid;
  874. gameplay::ScriptUtil::LuaArray<ScriptTarget::Event> param1 = gameplay::ScriptUtil::getObjectPointer<ScriptTarget::Event>(2, "ScriptTargetEvent", false, &param1Valid);
  875. if (!param1Valid)
  876. break;
  877. AnimationClip* instance = getInstance(state);
  878. bool result = instance->hasScriptListener(param1);
  879. // Push the return value onto the stack.
  880. lua_pushboolean(state, result);
  881. return 1;
  882. }
  883. } while (0);
  884. lua_pushstring(state, "lua_AnimationClip_hasScriptListener - Failed to match the given parameters to a valid function signature.");
  885. lua_error(state);
  886. break;
  887. }
  888. default:
  889. {
  890. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  891. lua_error(state);
  892. break;
  893. }
  894. }
  895. return 0;
  896. }
  897. int lua_AnimationClip_isPlaying(lua_State* state)
  898. {
  899. // Get the number of parameters.
  900. int paramCount = lua_gettop(state);
  901. // Attempt to match the parameters to a valid binding.
  902. switch (paramCount)
  903. {
  904. case 1:
  905. {
  906. if ((lua_type(state, 1) == LUA_TUSERDATA))
  907. {
  908. AnimationClip* instance = getInstance(state);
  909. bool result = instance->isPlaying();
  910. // Push the return value onto the stack.
  911. lua_pushboolean(state, result);
  912. return 1;
  913. }
  914. lua_pushstring(state, "lua_AnimationClip_isPlaying - Failed to match the given parameters to a valid function signature.");
  915. lua_error(state);
  916. break;
  917. }
  918. default:
  919. {
  920. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  921. lua_error(state);
  922. break;
  923. }
  924. }
  925. return 0;
  926. }
  927. int lua_AnimationClip_pause(lua_State* state)
  928. {
  929. // Get the number of parameters.
  930. int paramCount = lua_gettop(state);
  931. // Attempt to match the parameters to a valid binding.
  932. switch (paramCount)
  933. {
  934. case 1:
  935. {
  936. if ((lua_type(state, 1) == LUA_TUSERDATA))
  937. {
  938. AnimationClip* instance = getInstance(state);
  939. instance->pause();
  940. return 0;
  941. }
  942. lua_pushstring(state, "lua_AnimationClip_pause - Failed to match the given parameters to a valid function signature.");
  943. lua_error(state);
  944. break;
  945. }
  946. default:
  947. {
  948. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  949. lua_error(state);
  950. break;
  951. }
  952. }
  953. return 0;
  954. }
  955. int lua_AnimationClip_play(lua_State* state)
  956. {
  957. // Get the number of parameters.
  958. int paramCount = lua_gettop(state);
  959. // Attempt to match the parameters to a valid binding.
  960. switch (paramCount)
  961. {
  962. case 1:
  963. {
  964. if ((lua_type(state, 1) == LUA_TUSERDATA))
  965. {
  966. AnimationClip* instance = getInstance(state);
  967. instance->play();
  968. return 0;
  969. }
  970. lua_pushstring(state, "lua_AnimationClip_play - Failed to match the given parameters to a valid function signature.");
  971. lua_error(state);
  972. break;
  973. }
  974. default:
  975. {
  976. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  977. lua_error(state);
  978. break;
  979. }
  980. }
  981. return 0;
  982. }
  983. int lua_AnimationClip_release(lua_State* state)
  984. {
  985. // Get the number of parameters.
  986. int paramCount = lua_gettop(state);
  987. // Attempt to match the parameters to a valid binding.
  988. switch (paramCount)
  989. {
  990. case 1:
  991. {
  992. if ((lua_type(state, 1) == LUA_TUSERDATA))
  993. {
  994. AnimationClip* instance = getInstance(state);
  995. instance->release();
  996. return 0;
  997. }
  998. lua_pushstring(state, "lua_AnimationClip_release - Failed to match the given parameters to a valid function signature.");
  999. lua_error(state);
  1000. break;
  1001. }
  1002. default:
  1003. {
  1004. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1005. lua_error(state);
  1006. break;
  1007. }
  1008. }
  1009. return 0;
  1010. }
  1011. int lua_AnimationClip_removeBeginListener(lua_State* state)
  1012. {
  1013. // Get the number of parameters.
  1014. int paramCount = lua_gettop(state);
  1015. // Attempt to match the parameters to a valid binding.
  1016. switch (paramCount)
  1017. {
  1018. case 2:
  1019. {
  1020. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1021. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1022. {
  1023. // Get parameter 1 off the stack.
  1024. bool param1Valid;
  1025. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  1026. if (!param1Valid)
  1027. {
  1028. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  1029. lua_error(state);
  1030. }
  1031. AnimationClip* instance = getInstance(state);
  1032. instance->removeBeginListener(param1);
  1033. return 0;
  1034. }
  1035. lua_pushstring(state, "lua_AnimationClip_removeBeginListener - Failed to match the given parameters to a valid function signature.");
  1036. lua_error(state);
  1037. break;
  1038. }
  1039. default:
  1040. {
  1041. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1042. lua_error(state);
  1043. break;
  1044. }
  1045. }
  1046. return 0;
  1047. }
  1048. int lua_AnimationClip_removeEndListener(lua_State* state)
  1049. {
  1050. // Get the number of parameters.
  1051. int paramCount = lua_gettop(state);
  1052. // Attempt to match the parameters to a valid binding.
  1053. switch (paramCount)
  1054. {
  1055. case 2:
  1056. {
  1057. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1058. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
  1059. {
  1060. // Get parameter 1 off the stack.
  1061. bool param1Valid;
  1062. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  1063. if (!param1Valid)
  1064. {
  1065. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  1066. lua_error(state);
  1067. }
  1068. AnimationClip* instance = getInstance(state);
  1069. instance->removeEndListener(param1);
  1070. return 0;
  1071. }
  1072. lua_pushstring(state, "lua_AnimationClip_removeEndListener - Failed to match the given parameters to a valid function signature.");
  1073. lua_error(state);
  1074. break;
  1075. }
  1076. default:
  1077. {
  1078. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1079. lua_error(state);
  1080. break;
  1081. }
  1082. }
  1083. return 0;
  1084. }
  1085. int lua_AnimationClip_removeListener(lua_State* state)
  1086. {
  1087. // Get the number of parameters.
  1088. int paramCount = lua_gettop(state);
  1089. // Attempt to match the parameters to a valid binding.
  1090. switch (paramCount)
  1091. {
  1092. case 3:
  1093. {
  1094. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1095. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  1096. lua_type(state, 3) == LUA_TNUMBER)
  1097. {
  1098. // Get parameter 1 off the stack.
  1099. bool param1Valid;
  1100. gameplay::ScriptUtil::LuaArray<AnimationClip::Listener> param1 = gameplay::ScriptUtil::getObjectPointer<AnimationClip::Listener>(2, "AnimationClipListener", false, &param1Valid);
  1101. if (!param1Valid)
  1102. {
  1103. lua_pushstring(state, "Failed to convert parameter 1 to type 'AnimationClip::Listener'.");
  1104. lua_error(state);
  1105. }
  1106. // Get parameter 2 off the stack.
  1107. unsigned long param2 = (unsigned long)luaL_checkunsigned(state, 3);
  1108. AnimationClip* instance = getInstance(state);
  1109. instance->removeListener(param1, param2);
  1110. return 0;
  1111. }
  1112. lua_pushstring(state, "lua_AnimationClip_removeListener - Failed to match the given parameters to a valid function signature.");
  1113. lua_error(state);
  1114. break;
  1115. }
  1116. default:
  1117. {
  1118. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1119. lua_error(state);
  1120. break;
  1121. }
  1122. }
  1123. return 0;
  1124. }
  1125. int lua_AnimationClip_removeScript(lua_State* state)
  1126. {
  1127. // Get the number of parameters.
  1128. int paramCount = lua_gettop(state);
  1129. // Attempt to match the parameters to a valid binding.
  1130. switch (paramCount)
  1131. {
  1132. case 2:
  1133. {
  1134. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1135. (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL))
  1136. {
  1137. // Get parameter 1 off the stack.
  1138. const char* param1 = gameplay::ScriptUtil::getString(2, false);
  1139. AnimationClip* instance = getInstance(state);
  1140. bool result = instance->removeScript(param1);
  1141. // Push the return value onto the stack.
  1142. lua_pushboolean(state, result);
  1143. return 1;
  1144. }
  1145. lua_pushstring(state, "lua_AnimationClip_removeScript - Failed to match the given parameters to a valid function signature.");
  1146. lua_error(state);
  1147. break;
  1148. }
  1149. default:
  1150. {
  1151. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1152. lua_error(state);
  1153. break;
  1154. }
  1155. }
  1156. return 0;
  1157. }
  1158. int lua_AnimationClip_removeScriptCallback(lua_State* state)
  1159. {
  1160. // Get the number of parameters.
  1161. int paramCount = lua_gettop(state);
  1162. // Attempt to match the parameters to a valid binding.
  1163. switch (paramCount)
  1164. {
  1165. case 3:
  1166. {
  1167. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1168. (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL) &&
  1169. (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL))
  1170. {
  1171. // Get parameter 1 off the stack.
  1172. bool param1Valid;
  1173. gameplay::ScriptUtil::LuaArray<ScriptTarget::Event> param1 = gameplay::ScriptUtil::getObjectPointer<ScriptTarget::Event>(2, "ScriptTargetEvent", false, &param1Valid);
  1174. if (!param1Valid)
  1175. {
  1176. lua_pushstring(state, "Failed to convert parameter 1 to type 'ScriptTarget::Event'.");
  1177. lua_error(state);
  1178. }
  1179. // Get parameter 2 off the stack.
  1180. const char* param2 = gameplay::ScriptUtil::getString(3, false);
  1181. AnimationClip* instance = getInstance(state);
  1182. instance->removeScriptCallback(param1, param2);
  1183. return 0;
  1184. }
  1185. lua_pushstring(state, "lua_AnimationClip_removeScriptCallback - Failed to match the given parameters to a valid function signature.");
  1186. lua_error(state);
  1187. break;
  1188. }
  1189. default:
  1190. {
  1191. lua_pushstring(state, "Invalid number of parameters (expected 3).");
  1192. lua_error(state);
  1193. break;
  1194. }
  1195. }
  1196. return 0;
  1197. }
  1198. int lua_AnimationClip_setActiveDuration(lua_State* state)
  1199. {
  1200. // Get the number of parameters.
  1201. int paramCount = lua_gettop(state);
  1202. // Attempt to match the parameters to a valid binding.
  1203. switch (paramCount)
  1204. {
  1205. case 2:
  1206. {
  1207. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1208. lua_type(state, 2) == LUA_TNUMBER)
  1209. {
  1210. // Get parameter 1 off the stack.
  1211. unsigned long param1 = (unsigned long)luaL_checkunsigned(state, 2);
  1212. AnimationClip* instance = getInstance(state);
  1213. instance->setActiveDuration(param1);
  1214. return 0;
  1215. }
  1216. lua_pushstring(state, "lua_AnimationClip_setActiveDuration - Failed to match the given parameters to a valid function signature.");
  1217. lua_error(state);
  1218. break;
  1219. }
  1220. default:
  1221. {
  1222. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1223. lua_error(state);
  1224. break;
  1225. }
  1226. }
  1227. return 0;
  1228. }
  1229. int lua_AnimationClip_setBlendWeight(lua_State* state)
  1230. {
  1231. // Get the number of parameters.
  1232. int paramCount = lua_gettop(state);
  1233. // Attempt to match the parameters to a valid binding.
  1234. switch (paramCount)
  1235. {
  1236. case 2:
  1237. {
  1238. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1239. lua_type(state, 2) == LUA_TNUMBER)
  1240. {
  1241. // Get parameter 1 off the stack.
  1242. float param1 = (float)luaL_checknumber(state, 2);
  1243. AnimationClip* instance = getInstance(state);
  1244. instance->setBlendWeight(param1);
  1245. return 0;
  1246. }
  1247. lua_pushstring(state, "lua_AnimationClip_setBlendWeight - Failed to match the given parameters to a valid function signature.");
  1248. lua_error(state);
  1249. break;
  1250. }
  1251. default:
  1252. {
  1253. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1254. lua_error(state);
  1255. break;
  1256. }
  1257. }
  1258. return 0;
  1259. }
  1260. int lua_AnimationClip_setLoopBlendTime(lua_State* state)
  1261. {
  1262. // Get the number of parameters.
  1263. int paramCount = lua_gettop(state);
  1264. // Attempt to match the parameters to a valid binding.
  1265. switch (paramCount)
  1266. {
  1267. case 2:
  1268. {
  1269. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1270. lua_type(state, 2) == LUA_TNUMBER)
  1271. {
  1272. // Get parameter 1 off the stack.
  1273. float param1 = (float)luaL_checknumber(state, 2);
  1274. AnimationClip* instance = getInstance(state);
  1275. instance->setLoopBlendTime(param1);
  1276. return 0;
  1277. }
  1278. lua_pushstring(state, "lua_AnimationClip_setLoopBlendTime - Failed to match the given parameters to a valid function signature.");
  1279. lua_error(state);
  1280. break;
  1281. }
  1282. default:
  1283. {
  1284. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1285. lua_error(state);
  1286. break;
  1287. }
  1288. }
  1289. return 0;
  1290. }
  1291. int lua_AnimationClip_setRepeatCount(lua_State* state)
  1292. {
  1293. // Get the number of parameters.
  1294. int paramCount = lua_gettop(state);
  1295. // Attempt to match the parameters to a valid binding.
  1296. switch (paramCount)
  1297. {
  1298. case 2:
  1299. {
  1300. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1301. lua_type(state, 2) == LUA_TNUMBER)
  1302. {
  1303. // Get parameter 1 off the stack.
  1304. float param1 = (float)luaL_checknumber(state, 2);
  1305. AnimationClip* instance = getInstance(state);
  1306. instance->setRepeatCount(param1);
  1307. return 0;
  1308. }
  1309. lua_pushstring(state, "lua_AnimationClip_setRepeatCount - Failed to match the given parameters to a valid function signature.");
  1310. lua_error(state);
  1311. break;
  1312. }
  1313. default:
  1314. {
  1315. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1316. lua_error(state);
  1317. break;
  1318. }
  1319. }
  1320. return 0;
  1321. }
  1322. int lua_AnimationClip_setSpeed(lua_State* state)
  1323. {
  1324. // Get the number of parameters.
  1325. int paramCount = lua_gettop(state);
  1326. // Attempt to match the parameters to a valid binding.
  1327. switch (paramCount)
  1328. {
  1329. case 2:
  1330. {
  1331. if ((lua_type(state, 1) == LUA_TUSERDATA) &&
  1332. lua_type(state, 2) == LUA_TNUMBER)
  1333. {
  1334. // Get parameter 1 off the stack.
  1335. float param1 = (float)luaL_checknumber(state, 2);
  1336. AnimationClip* instance = getInstance(state);
  1337. instance->setSpeed(param1);
  1338. return 0;
  1339. }
  1340. lua_pushstring(state, "lua_AnimationClip_setSpeed - Failed to match the given parameters to a valid function signature.");
  1341. lua_error(state);
  1342. break;
  1343. }
  1344. default:
  1345. {
  1346. lua_pushstring(state, "Invalid number of parameters (expected 2).");
  1347. lua_error(state);
  1348. break;
  1349. }
  1350. }
  1351. return 0;
  1352. }
  1353. int lua_AnimationClip_static_REPEAT_INDEFINITE(lua_State* state)
  1354. {
  1355. // Validate the number of parameters.
  1356. if (lua_gettop(state) > 0)
  1357. {
  1358. lua_pushstring(state, "Invalid number of parameters (expected 0).");
  1359. lua_error(state);
  1360. }
  1361. unsigned int result = AnimationClip::REPEAT_INDEFINITE;
  1362. // Push the return value onto the stack.
  1363. lua_pushunsigned(state, result);
  1364. return 1;
  1365. }
  1366. int lua_AnimationClip_stop(lua_State* state)
  1367. {
  1368. // Get the number of parameters.
  1369. int paramCount = lua_gettop(state);
  1370. // Attempt to match the parameters to a valid binding.
  1371. switch (paramCount)
  1372. {
  1373. case 1:
  1374. {
  1375. if ((lua_type(state, 1) == LUA_TUSERDATA))
  1376. {
  1377. AnimationClip* instance = getInstance(state);
  1378. instance->stop();
  1379. return 0;
  1380. }
  1381. lua_pushstring(state, "lua_AnimationClip_stop - Failed to match the given parameters to a valid function signature.");
  1382. lua_error(state);
  1383. break;
  1384. }
  1385. default:
  1386. {
  1387. lua_pushstring(state, "Invalid number of parameters (expected 1).");
  1388. lua_error(state);
  1389. break;
  1390. }
  1391. }
  1392. return 0;
  1393. }
  1394. }