hx3d  1
2D/3D Simple Game Framework
tween_manager.hpp
1 
2 /*
3  Tween management.
4  Copyright (C) 2015 Denis BOURGE
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19  USA
20 */
21 
22 #ifndef HX3D_TWEENS_TWEENMANAGER
23 #define HX3D_TWEENS_TWEENMANAGER
24 
25 #include "hx3d/tweens/base_tween.hpp"
26 #include "hx3d/utils/ptr.hpp"
27 
28 #include <vector>
29 
30 namespace hx3d {
31 namespace tweens {
32 
36 class TweenManager {
37 public:
38  TweenManager();
39 
45  void add(const Ptr<BaseTween>& tween);
46 
52  void update(const float delta);
53 
59  unsigned int getTweenCount();
60 
64  void clear();
65 
66 private:
68  std::vector<Ptr<BaseTween>> tweens;
69 };
70 
71 } /* tween */
72 } /* hx3d */
73 
74 #endif
void update(const float delta)
Update all tweens.
hx3d framework namespace
Definition: audio.hpp:26
void add(const Ptr< BaseTween > &tween)
Add an existing tween.
unsigned int getTweenCount()
Get the tweens count.
void clear()
Clear all the tweens.
Tweens management and update.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.
Definition: ptr.hpp:34