diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-12-26 20:53:06 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-12-26 20:53:06 +1100 |
commit | 0a1a82b18b86362263c8fa9ce8919c6d3b36d85c (patch) | |
tree | 888f0c8ae4ae87bfb8f5c5aaec669e8ebaf68482 /source/game/StarHumanoid.hpp | |
parent | 3df5cb78da86912c30b6281f4eafeddd4ba56f32 (diff) |
Head Rotation
(way too hardcoded, not ideal but it will do in the meantime as many have been asking for it)
Diffstat (limited to 'source/game/StarHumanoid.hpp')
-rw-r--r-- | source/game/StarHumanoid.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/game/StarHumanoid.hpp b/source/game/StarHumanoid.hpp index c83ddb5..6fd1cbe 100644 --- a/source/game/StarHumanoid.hpp +++ b/source/game/StarHumanoid.hpp @@ -100,6 +100,8 @@ public: }; static EnumMap<State> const StateNames; + static bool& globalHeadRotation(Maybe<bool> default = {}); + Humanoid(Json const& config); Humanoid(HumanoidIdentity const& identity); Humanoid(Humanoid const&) = default; @@ -163,6 +165,7 @@ public: void setDance(Maybe<String> const& dance); void setFacingDirection(Direction facingDirection); void setMovingBackwards(bool movingBackwards); + void setHeadRotation(float headRotation); void setRotation(float rotation); void setScale(Vec2F scale); @@ -183,6 +186,7 @@ public: void setPrimaryHandFrameOverrides(String backFrameOverride, String frontFrameOverride); void setPrimaryHandDrawables(List<Drawable> drawables); void setPrimaryHandNonRotatedDrawables(List<Drawable> drawables); + bool primaryHandHoldingItem() const; // Same as primary hand. void setAltHandParameters(bool holdingItem, float angle, float itemAngle, bool recoil, @@ -190,6 +194,7 @@ public: void setAltHandFrameOverrides(String backFrameOverride, String frontFrameOverride); void setAltHandDrawables(List<Drawable> drawables); void setAltHandNonRotatedDrawables(List<Drawable> drawables); + bool altHandHoldingItem() const; // Updates the animation based on whatever the current animation state is, // wrapping or clamping animation time as appropriate. @@ -355,6 +360,8 @@ private: Maybe<String> m_dance; Direction m_facingDirection; bool m_movingBackwards; + float m_headRotation; + float m_headRotationTarget; float m_rotation; Vec2F m_scale; bool m_drawVaporTrail; |