MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / loadGroups

Method loadGroups

src/Core/Animation/Animation.cpp:301–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299 }
300
301 void Animation::loadGroups(vili::node& groups)
302 {
303 for (auto [groupName, group] : groups.items())
304 {
305 Debug::Log->trace(" <Animation> Loading AnimationGroup '{}'", groupName);
306 m_groups.emplace(groupName, std::make_unique<AnimationGroup>(groupName));
307 for (vili::node& currentTexture : group.at("content"))
308 {
309 Debug::Log->trace(" <Animation> Pushing Texture {} into group",
310 currentTexture.as<vili::integer>());
311 m_groups[groupName]->pushTexture(
312 m_textures[currentTexture.as<vili::integer>()]);
313 }
314
315 if (!group["clock"].is_null())
316 {
317 const unsigned int delay = group.at("clock");
318 Debug::Log->trace(" <Animation> Setting group delay to {}", delay);
319 m_groups[groupName]->setDelay(delay);
320 }
321 else
322 {
323 Debug::Log->trace(
324 " <Animation> No delay specified, using parent delay : {}",
325 m_delay);
326 m_groups[groupName]->setDelay(m_delay);
327 }
328 }
329 }
330
331 void Animation::loadCode(vili::node& code)
332 {

Callers 1

loadAnimationMethod · 0.95

Calls 6

traceMethod · 0.80
pushTextureMethod · 0.80
setDelayMethod · 0.80
emplaceMethod · 0.45
atMethod · 0.45
is_nullMethod · 0.45

Tested by

no test coverage detected