3
* Copyright (C) 2006-2009 The Mana World Development Team
4
* Copyright (C) 2009-2010 The Mana Developers
5
* Copyright (C) 2011-2013 The ManaPlus Developers
7
* This file is part of The ManaPlus Client.
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
23
#include "animationparticle.h"
26
#include "simpleanimation.h"
30
AnimationParticle::AnimationParticle(Map *const map,
31
Animation *const animation) :
32
ImageParticle(map, nullptr),
33
mAnimation(new SimpleAnimation(animation))
37
AnimationParticle::AnimationParticle(Map *const map,
38
XmlNodePtr const animationNode,
39
const std::string& dyePalettes):
40
ImageParticle(map, nullptr),
41
mAnimation(new SimpleAnimation(animationNode, dyePalettes))
45
AnimationParticle::~AnimationParticle()
52
bool AnimationParticle::update()
56
mAnimation->update(10); // particle engine is updated every 10ms
57
mImage = mAnimation->getCurrentImage();
59
return Particle::update();