Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarAnimation.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2025-05-31 16:35:10 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2025-05-31 16:35:10 +1000
commit6245f795e9c4546cf4ef86b27bc764cc9a896195 (patch)
tree4284227942b59c13f547c07666e2816dc72dfca6 /source/game/StarAnimation.cpp
parent8e381cb362f8d40dffc3dca610bb70c9b3e7b94d (diff)
simple support for animated parallax textures
Diffstat (limited to 'source/game/StarAnimation.cpp')
-rw-r--r--source/game/StarAnimation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/game/StarAnimation.cpp b/source/game/StarAnimation.cpp
index 09da400..d8d62dc 100644
--- a/source/game/StarAnimation.cpp
+++ b/source/game/StarAnimation.cpp
@@ -27,8 +27,8 @@ Animation::Animation(Json config, String const& directory) {
// to the end.
m_appendFrame = !m_base.contains("<index>");
m_frameNumber = config.getInt("frameNumber", 1);
- m_animationCycle = config.getDouble("animationCycle", 1.0);
- m_animationTime = m_animationCycle * config.getDouble("loops", 1.0);
+ m_animationCycle = config.getFloat("animationCycle", 1.0);
+ m_animationTime = m_animationCycle * config.getFloat("loops", 1.0);
m_angle = config.getFloat("angle", 0.0f);
m_offset = jsonToVec2F(config.get("offset", JsonArray{0.0f, 0.0f}));
m_centered = config.getBool("centered", true);