2020-08-04 12:31:33 +08:00
|
|
|
#ifndef __TWEENMANAGER_H__
|
|
|
|
#define __TWEENMANAGER_H__
|
|
|
|
|
|
|
|
#include "FairyGUIMacros.h"
|
|
|
|
#include "TweenPropType.h"
|
|
|
|
#include "cocos2d.h"
|
|
|
|
|
|
|
|
NS_FGUI_BEGIN
|
|
|
|
|
|
|
|
class GTweener;
|
|
|
|
|
|
|
|
class TweenManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static GTweener* createTween();
|
2022-08-08 18:02:17 +08:00
|
|
|
static bool isTweening(ax::Ref* target, TweenPropType propType);
|
|
|
|
static bool killTweens(ax::Ref* target, TweenPropType propType, bool completed);
|
|
|
|
static GTweener* getTween(ax::Ref* target, TweenPropType propType);
|
2020-08-04 12:31:33 +08:00
|
|
|
static void update(float dt);
|
|
|
|
static void clean();
|
|
|
|
static void init();
|
|
|
|
|
|
|
|
private:
|
2022-08-08 18:02:17 +08:00
|
|
|
static void reset(ax::EventCustom*);
|
2020-08-04 12:31:33 +08:00
|
|
|
|
|
|
|
static GTweener** _activeTweens;
|
|
|
|
static std::vector<GTweener*> _tweenerPool;
|
|
|
|
static int _totalActiveTweens;
|
|
|
|
static int _arrayLength;
|
|
|
|
static bool _inited;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS_FGUI_END
|
|
|
|
|
|
|
|
#endif
|