axmol/extensions/fairygui/tween/GTween.h

38 lines
1.9 KiB
C
Raw Normal View History

2020-08-04 12:31:33 +08:00
#ifndef __GTWEEN_H__
#define __GTWEEN_H__
#include "FairyGUIMacros.h"
#include "cocos2d.h"
#include "GTweener.h"
#include "EaseType.h"
#include "TweenValue.h"
#include "TweenPropType.h"
NS_FGUI_BEGIN
class GTween
{
public:
static GTweener* to(float startValue, float endValue, float duration);
2022-08-08 18:02:17 +08:00
static GTweener* to(const ax::Vec2& startValue, const ax::Vec2& endValue, float duration);
static GTweener* to(const ax::Vec3& startValue, const ax::Vec3& endValue, float duration);
static GTweener* to(const ax::Vec4& startValue, const ax::Vec4& endValue, float duration);
static GTweener* to(const ax::Color4B& startValue, const ax::Color4B& endValue, float duration);
2024-01-06 23:25:20 +08:00
static GTweener* toFloat(float startValue, float endValue, float duration) { return to(startValue, endValue, duration); }
static GTweener* toVec2(const ax::Vec2& startValue, const ax::Vec2& endValue, float duration) { return to(startValue, endValue, duration); }
static GTweener* toVec3(const ax::Vec3& startValue, const ax::Vec3& endValue, float duration) { return to(startValue, endValue, duration); }
static GTweener* toVec4(const ax::Vec4& startValue, const ax::Vec4& endValue, float duration) { return to(startValue, endValue, duration); }
static GTweener* toColor4B(const ax::Color4B& startValue, const ax::Color4B& endValue, float duration) { return to(startValue, endValue, duration); }
2020-08-04 12:31:33 +08:00
static GTweener* toDouble(double startValue, double endValue, float duration);
static GTweener* delayedCall(float delay);
2022-08-08 18:02:17 +08:00
static GTweener* shake(const ax::Vec2& startValue, float amplitude, float duration);
2024-01-06 23:25:20 +08:00
static bool isTweening(ax::Ref* target, TweenPropType propType = TweenPropType::None);
static void kill(ax::Ref* target, TweenPropType propType = TweenPropType::None, bool complete = false);
static GTweener* getTween(ax::Ref* target, TweenPropType propType = TweenPropType::None);
2020-08-04 12:31:33 +08:00
static void clean();
};
NS_FGUI_END
#endif