예제 #1
0
void AnimationManager::setupBossAnimations(GameEntity* ge){
	Ogre::AnimationStateIterator it = static_cast<Entity*>(ge->getSceneNode()->getAttachedObject(0))->getAllAnimationStates()->getAnimationStateIterator();
	it.begin()->second->setEnabled(true);
	it.begin()->second->setLoop(true);
	it.begin()->second->setTimePosition(0.0);
	_animsBoss[ge->getSceneNode()->getName()]=it.begin()->second;
}
예제 #2
0
void AnimationManager::setupEnemyAnimations(String name){
	std::string animName = "";

	if(Ogre::StringUtil::match(_enemies->back()->getType(),"rabbit")){
		animName = "walkEnemy";
	}
	else{
		animName = "walkRex";
	}
	Ogre::AnimationStateIterator it = static_cast<Entity*>(_enemies->back()->getSceneNode()->getAttachedObject(0))->getAllAnimationStates()->getAnimationStateIterator();
	it.begin()->second->setEnabled(true);
	it.begin()->second->setLoop(true);
	it.begin()->second->setTimePosition(0.0);
	_animsEnemy[name]=it.begin()->second;
}