-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEffectManager.h
42 lines (37 loc) · 901 Bytes
/
EffectManager.h
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
//
// EffectManager.h
// StarPlane
//
// Created by shaoleibo on 15-3-1.
//
//
#ifndef __StarPlane__EffectManager__
#define __StarPlane__EffectManager__
#include "cocos2d.h"
#include "Effect.h"
#include <map>
#include <vector>
class EffectManager : public ::cocos2d::CCObject
{
public:
static EffectManager& getInstance()
{
static EffectManager instance;
return instance;
}
void addEffect( EffectInfo& effectInfo );
void removeEffect(EffectNode* effectNode);
void removeEffect(EffectNode* effectNode, const char* effectName);
void removeAllEffect();
void tick(float dt);
void pauseTick();
void resumeTick();
private:
EffectManager();
EffectManager(const EffectManager&);
EffectManager& operator=(const EffectManager&);
~EffectManager();
private:
std::map<EffectNode*, std::vector<Effect*> > effectDic;
};
#endif /* defined(__StarPlane__EffectManager__) */