| 104 | bindAnimationGroup["setLoops"] = &obe::Animation::AnimationGroup::setLoops; |
| 105 | } |
| 106 | void LoadClassAnimator(sol::state_view state) |
| 107 | { |
| 108 | sol::table AnimationNamespace = state["obe"]["Animation"].get<sol::table>(); |
| 109 | sol::usertype<obe::Animation::Animator> bindAnimator |
| 110 | = AnimationNamespace.new_usertype<obe::Animation::Animator>( |
| 111 | "Animator", sol::call_constructor, sol::default_constructor); |
| 112 | bindAnimator["clear"] = &obe::Animation::Animator::clear; |
| 113 | bindAnimator["getAllAnimationName"] |
| 114 | = &obe::Animation::Animator::getAllAnimationName; |
| 115 | bindAnimator["getAnimation"] = &obe::Animation::Animator::getAnimation; |
| 116 | bindAnimator["getKey"] = &obe::Animation::Animator::getKey; |
| 117 | bindAnimator["getTexture"] = &obe::Animation::Animator::getTexture; |
| 118 | bindAnimator["getTextureAtKey"] = &obe::Animation::Animator::getTextureAtKey; |
| 119 | bindAnimator["load"] = sol::overload( |
| 120 | [](obe::Animation::Animator* self, obe::System::Path path) -> void { |
| 121 | return self->load(path); |
| 122 | }, |
| 123 | [](obe::Animation::Animator* self, obe::System::Path path, |
| 124 | obe::Engine::ResourceManager* resources) -> void { |
| 125 | return self->load(path, resources); |
| 126 | }); |
| 127 | bindAnimator["setKey"] = &obe::Animation::Animator::setKey; |
| 128 | bindAnimator["setPaused"] = &obe::Animation::Animator::setPaused; |
| 129 | bindAnimator["update"] = &obe::Animation::Animator::update; |
| 130 | bindAnimator["setTarget"] = sol::overload( |
| 131 | [](obe::Animation::Animator* self, obe::Graphics::Sprite& sprite) -> void { |
| 132 | return self->setTarget(sprite); |
| 133 | }, |
| 134 | [](obe::Animation::Animator* self, obe::Graphics::Sprite& sprite, |
| 135 | obe::Animation::AnimatorTargetScaleMode targetScaleMode) -> void { |
| 136 | return self->setTarget(sprite, targetScaleMode); |
| 137 | }); |
| 138 | } |
| 139 | void LoadClassValueTweening(sol::state_view state) |
| 140 | { |
| 141 | sol::table AnimationNamespace = state["obe"]["Animation"].get<sol::table>(); |