ISpriteAnimator.h
1.16 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
//
// ISpriteAnimator.h
// SteveMaggieCpp
//
// Created by Katarzyna Kalinowska-Górska on 06.06.2017.
//
//
#ifndef ISpriteAnimator_h
#define ISpriteAnimator_h
#include "cocos2d.h"
class ISpriteAnimator : public cocos2d::Ref
{
public:
static int AnimationTagUnknownAnimation;
union AnimParam {
int intParam;
float floatParam;
bool boolParam;
};
//this should return action tag
virtual int animateSprite(cocos2d::Sprite* sprite, int animationTag, std::vector<AnimParam> animParams, std::function<void()> callback) = 0;
// virtual int animateSprites(std::vector<cocos2d::Sprite*> sprites, std::string animationName, std::vector<std::vector<AnimParam>> animParams){
// for(int i = 0; i < sprites.size(); ++i){
// animateSprite(sprites[i], animationName, animParams[i]);
// }
// }
// virtual int animateSprites(std::vector<cocos2d::Sprite*> sprites, std::string animationName, std::vector<AnimParam> animParams){
// for(int i = 0; i < sprites.size(); ++i){
// animateSprite(sprites[i], animationName, animParams);
// }
// }
};
#endif /* ISpriteAnimator_h */