Unravel Engine C++ Reference
Loading...
Searching...
No Matches
animation_component.cpp
Go to the documentation of this file.
2#include <hpp/utility/overload.hpp>
3namespace unravel
4{
5
7{
8 animation_ = animation;
9}
11{
12 return animation_;
13}
14
16{
17 auto_play_ = on;
18}
19
21{
22 return auto_play_;
23}
24
26{
27 apply_root_motion_ = on;
28}
29
31{
32 return apply_root_motion_;
33}
34
36{
37 culling_mode_ = mode;
38}
39
41{
42 return culling_mode_;
43}
44
46{
47 speed_ = std::max(0.0f, speed);
48}
49
50auto animation_component::get_speed() const -> float
51{
52 return speed_;
53}
54
56{
57 return player_;
58}
60{
61 return player_;
62}
63
64} // namespace unravel
void set_culling_mode(const culling_mode &animation)
auto get_player() const -> const animation_player &
auto get_culling_mode() const -> const culling_mode &
auto get_speed() const -> float
Gets the current speed for animation playback.
void set_speed(float speed)
Sets the speed for animation playback.
auto get_animation() const -> const asset_handle< animation_clip > &
auto get_autoplay() const -> bool
Gets whether the animation is set to autoplay.
void set_animation(const asset_handle< animation_clip > &animation)
auto get_apply_root_motion() const -> bool
void set_autoplay(bool on)
Sets whether the animation should autoplay.
Class responsible for playing animations on a skeletal mesh.
Represents a handle to an asset, providing access and management functions.
Struct representing an animation.
Definition animation.h:99