sets the playback rate of the flipbook animation on a node * This is only useful nodes with flipbook animations. Sets the playback rate of the flipbook animation on a node. Must be positive. * * @name gui.set_flipbook_playback_rate * @param node [type:node] node to set the cursor for * @param playback_rate [type:number] playback rate */
| 4619 | * @param playback_rate [type:number] playback rate |
| 4620 | */ |
| 4621 | static int LuaSetFlipbookPlaybackRate(lua_State* L) |
| 4622 | { |
| 4623 | DM_LUA_STACK_CHECK(L, 0); |
| 4624 | |
| 4625 | HNode node; |
| 4626 | Scene* scene = GuiScriptInstance_Check(L); |
| 4627 | LuaCheckNodeInternal(L, 1, &node); |
| 4628 | |
| 4629 | if(dmGui::GetNodeIsBone(scene, node)) |
| 4630 | { |
| 4631 | return DM_LUA_ERROR("cannot set playback rate for bone"); |
| 4632 | } |
| 4633 | |
| 4634 | SetNodeFlipbookPlaybackRate(scene, node, luaL_checknumber(L, 2)); |
| 4635 | |
| 4636 | return 0; |
| 4637 | } |
| 4638 | |
| 4639 | /*# creates a new particle fx node |
| 4640 | * Dynamically create a particle fx node. |
nothing calls this directly
no test coverage detected