MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / setMenuEntityAnimation

Method setMenuEntityAnimation

source/render/RenderManager.cpp:294–310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294Ogre::AnimationState* RenderManager::setMenuEntityAnimation(const std::string& entityName, const std::string& animation, bool loop)
295{
296 if(!mSceneManager->hasEntity(entityName))
297 {
298 OD_LOG_ERR("There is no entity=" + entityName);
299 return nullptr;
300 }
301
302 Ogre::Entity* ent = mSceneManager->getEntity(entityName);
303 if(!ent->hasAnimationState(animation))
304 {
305 OD_LOG_ERR("Entity=" + ent->getName() + ", has no animation=" + animation);
306 return nullptr;
307 }
308
309 return setEntityAnimation(ent, animation, loop);
310}
311
312bool RenderManager::updateMenuEntityAnimation(Ogre::AnimationState* animState, Ogre::Real timeSinceLastFrame)
313{

Callers 5

activateMethod · 0.80
activateMethod · 0.80
activateMethod · 0.80
activateMethod · 0.80
activateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected