-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtween.h
More file actions
57 lines (44 loc) · 1.1 KB
/
tween.h
File metadata and controls
57 lines (44 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// tween.h
// CppTweener
//
// Created by wonhee jang on 13. 5. 14..
// Copyright (c) 2013년 vanillabreeze. All rights reserved.
//
#ifndef __CppTweener__tween__
#define __CppTweener__tween__
#include <iostream>
#include "CppTweener.h"
#include <list>
#include <time.h>
using namespace tween;
class tween_manager {
public:
struct animation {
std::string tag;
Tweener tween;
long tick;
clock_t mkclock;
animation() {
tag = "";
tick = 0;
tween = Tweener();
mkclock = clock();
}
~animation() {
}
bool operator == (const animation& _animation) {
return (_animation.mkclock == mkclock);
}
};
std::list<animation> list_animation;
bool update_animation(std::list<animation>::iterator _it, long _milli_seconds);
private:
tween_manager();
public:
static tween_manager* share();
void start(std::string _tag, long _time, float* _src, float _dst, short _equation = EASE_IN_OUT, short _transition = EXPO, TweenerListener* _listener = NULL, short _delay = 0);
void stop(std::string _tag);
void update(float _tick);
};
#endif /* defined(__CppTweener__tween__) */