Animation* EffectManager::loadAnimation(std::string &s) { if (s != "") { AnimationSet *animationSet = anim->getAnimationSet(s); return animationSet->getAnimation(); } return NULL; }
void Loot::loadAnimation(std::string _gfx) { gfx = _gfx; if (gfx != "") { anim->increaseCount(gfx); AnimationSet *as = anim->getAnimationSet(gfx); animation = as->getAnimation(); } }
void Hazard::loadAnimation(std::string &s) { if (activeAnimation) { anim->decreaseCount(animation_name); delete activeAnimation; activeAnimation = 0; } animation_name = s; if (animation_name != "") { anim->increaseCount(animation_name); AnimationSet *animationSet = anim->getAnimationSet(animation_name); activeAnimation = animationSet->getAnimation(); } }