| 292 | } |
| 293 | |
| 294 | Ogre::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 | |
| 312 | bool RenderManager::updateMenuEntityAnimation(Ogre::AnimationState* animState, Ogre::Real timeSinceLastFrame) |
| 313 | { |