lua_AnimationClip.cpp 49 KB

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